setup.py 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. # systemctl-mqtt - MQTT client triggering & reporting shutdown on systemd-based systems
  2. #
  3. # Copyright (C) 2020 Fabian Peter Hammerle <fabian@hammerle.me>
  4. #
  5. # This program is free software: you can redistribute it and/or modify
  6. # it under the terms of the GNU General Public License as published by
  7. # the Free Software Foundation, either version 3 of the License, or
  8. # any later version.
  9. #
  10. # This program is distributed in the hope that it will be useful,
  11. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. # GNU General Public License for more details.
  14. #
  15. # You should have received a copy of the GNU General Public License
  16. # along with this program. If not, see <https://www.gnu.org/licenses/>.
  17. import pathlib
  18. import setuptools
  19. _REPO_URL = "https://github.com/fphammerle/systemctl-mqtt"
  20. setuptools.setup(
  21. name="systemctl-mqtt",
  22. use_scm_version={
  23. # > AssertionError: cant parse version docker/0.1.0-amd64
  24. # https://github.com/pypa/setuptools_scm/blob/master/src/setuptools_scm/git.py#L15
  25. "git_describe_command": "git describe --dirty --tags --long --match v*",
  26. },
  27. packages=setuptools.find_packages(),
  28. description="MQTT client triggering & reporting shutdown on systemd-based systems",
  29. long_description=pathlib.Path(__file__).parent.joinpath("README.md").read_text(),
  30. long_description_content_type="text/markdown",
  31. author="Fabian Peter Hammerle",
  32. author_email="fabian@hammerle.me",
  33. url=_REPO_URL,
  34. project_urls={"Changelog": _REPO_URL + "/blob/master/CHANGELOG.md"},
  35. license="GPLv3+",
  36. keywords=[
  37. "IoT",
  38. "automation",
  39. "home-assistant",
  40. "home-automation",
  41. "lock",
  42. "mqtt",
  43. "shutdown",
  44. "systemd",
  45. ],
  46. classifiers=[
  47. # https://pypi.org/classifiers/
  48. "Development Status :: 4 - Beta",
  49. "Intended Audience :: End Users/Desktop",
  50. "Intended Audience :: System Administrators",
  51. "License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)",
  52. "Operating System :: POSIX :: Linux",
  53. # .github/workflows/python.yml
  54. "Programming Language :: Python :: 3.7",
  55. "Programming Language :: Python :: 3.8",
  56. "Programming Language :: Python :: 3.9",
  57. "Programming Language :: Python :: 3.10",
  58. "Topic :: Home Automation",
  59. ],
  60. entry_points={
  61. "console_scripts": [
  62. "systemctl-mqtt = systemctl_mqtt:_main",
  63. ]
  64. },
  65. # >=3.6 variable type hints, f-strings & * to force keyword-only arguments
  66. python_requires=">=3.7", # python<3.7 untested
  67. # https://dbus.freedesktop.org/doc/dbus-python/news.html
  68. install_requires=["PyGObject<4", "dbus-python<2", "paho-mqtt<2"],
  69. setup_requires=["setuptools_scm"],
  70. tests_require=["pytest"],
  71. )