diff options
| author | Yuval Adam <_@yuv.al> | 2021-05-15 17:13:53 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-05-15 17:13:53 +0300 |
| commit | 616b715e5329dab505f8d92f06b8a13f14aaab86 (patch) | |
| tree | 1d7fa8bc54c48121ce0b16871f79c146942ea427 | |
| parent | 8da638260f689d7a3ee4a88c9435ef3e4a37a604 (diff) | |
Implement setuptools integration, fixes #2 (#7)
* Initial setup.py
* Add .gitignore
* Add setuptools entrypoint support
| -rw-r--r-- | .gitignore | 2 | ||||
| -rw-r--r-- | alarmpy/__init__.py | 1 | ||||
| -rw-r--r-- | alarmpy/alarmpy.py | 4 | ||||
| -rw-r--r-- | setup.py | 31 |
4 files changed, 36 insertions, 2 deletions
diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..8d35cb3 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +__pycache__ +*.pyc diff --git a/alarmpy/__init__.py b/alarmpy/__init__.py index e69de29..d74cd27 100644 --- a/alarmpy/__init__.py +++ b/alarmpy/__init__.py @@ -0,0 +1 @@ +from .alarmpy import alarmpy diff --git a/alarmpy/alarmpy.py b/alarmpy/alarmpy.py index e7263f5..0d26b7f 100644 --- a/alarmpy/alarmpy.py +++ b/alarmpy/alarmpy.py @@ -142,9 +142,9 @@ class Alarm: @click.option("--alarm-id", is_flag=True, help="Print alarm IDs") @click.option("--repeat-alarms", is_flag=True, help="Do not suppress ongoing alarms") @click.option("--quiet", is_flag=True, help="Print only active alarms") -def alarm(**kwargs): +def alarmpy(**kwargs): Alarm(**kwargs).start() if __name__ == "__main__": - alarm() + alarmpy() diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..e4caaca --- /dev/null +++ b/setup.py @@ -0,0 +1,31 @@ +import setuptools + +with open("README.md", "r", encoding="utf-8") as fh: + long_description = fh.read() + +setuptools.setup( + name="alarmpy", + version="1.0.0", + author="Yuval Adam", + author_email="_@yuv.al", + description="Pikud Ha'oref Alarm Tracking", + license="GPLv3", + long_description=long_description, + long_description_content_type="text/markdown", + url="https://github.com/yuvadm/alarmpy", + project_urls={ + "Bug Tracker": "https://github.com/yuvadm/alarmpy/issues", + }, + classifiers=[ + "Programming Language :: Python :: 3", + "Development Status :: 5 - Production/Stable", + "License :: OSI Approved :: GNU General Public License v3 (GPLv3)", + "Operating System :: OS Independent", + "Environment :: Console", + ], + package_dir={"": "alarmpy"}, + packages=setuptools.find_packages(where="alarmpy"), + python_requires=">=3.6", + install_requires=["requests", "click"], + entry_points={"console_scripts": ["alarmpy = alarmpy:alarmpy"]}, +) |
