70 lines
2.3 KiB
Python
70 lines
2.3 KiB
Python
from setuptools import setup, find_packages
|
|
import os
|
|
import re
|
|
|
|
# Read version and other metadata from __init__.py
|
|
def get_metadata():
|
|
"""Extract metadata from src/__init__.py"""
|
|
init_file = os.path.join(os.path.dirname(__file__), 'src', '__init__.py')
|
|
with open(init_file, 'r', encoding='utf-8') as f:
|
|
content = f.read()
|
|
|
|
version = re.search(r'__version__ = ["\']([^"\']+)["\']', content).group(1)
|
|
author = re.search(r'__author__ = ["\']([^"\']+)["\']', content).group(1)
|
|
email = re.search(r'__email__ = ["\']([^"\']+)["\']', content).group(1)
|
|
|
|
return version, author, email
|
|
|
|
# Read README for long description
|
|
def read_readme():
|
|
with open("README.md", "r", encoding="utf-8") as fh:
|
|
return fh.read()
|
|
|
|
version, author, email = get_metadata()
|
|
|
|
setup(
|
|
name='HereIAm',
|
|
version=version,
|
|
description='A macOS application that moves the mouse cursor to prevent inactivity.',
|
|
long_description=read_readme(),
|
|
long_description_content_type="text/markdown",
|
|
author=author,
|
|
author_email=email,
|
|
url='https://github.com/your-username/hereiam', # Update with your repo URL
|
|
packages=['src'], # Only include src package
|
|
package_dir={'src': 'src'},
|
|
package_data={
|
|
'': ['assets/*.icns', 'assets/*.png'], # Include assets at root level
|
|
},
|
|
include_package_data=True,
|
|
install_requires=[
|
|
'pyautogui>=0.9.54',
|
|
'PyQt5>=5.15.0',
|
|
'pyobjc-framework-Cocoa>=9.0',
|
|
'pyobjc-framework-Quartz>=9.0',
|
|
],
|
|
python_requires='>=3.8',
|
|
entry_points={
|
|
'console_scripts': [
|
|
'hereiam=src.main:main',
|
|
],
|
|
'gui_scripts': [
|
|
'hereiam-gui=src.main:main',
|
|
],
|
|
},
|
|
classifiers=[
|
|
"Development Status :: 4 - Beta",
|
|
"Intended Audience :: End Users/Desktop",
|
|
"Operating System :: MacOS",
|
|
"Programming Language :: Python :: 3",
|
|
"Programming Language :: Python :: 3.8",
|
|
"Programming Language :: Python :: 3.9",
|
|
"Programming Language :: Python :: 3.10",
|
|
"Programming Language :: Python :: 3.11",
|
|
"Programming Language :: Python :: 3.12",
|
|
"Topic :: Utilities",
|
|
"Environment :: MacOS X",
|
|
"Environment :: MacOS X :: Cocoa",
|
|
],
|
|
license="MIT",
|
|
) |