setup.py 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  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. packages=setuptools.find_packages(),
  23. description="MQTT client triggering & reporting shutdown on systemd-based systems",
  24. long_description=pathlib.Path(__file__).parent.joinpath("README.md").read_text(),
  25. long_description_content_type="text/markdown",
  26. author="Fabian Peter Hammerle",
  27. author_email="fabian@hammerle.me",
  28. url=_REPO_URL,
  29. project_urls={"Changelog": _REPO_URL + "/blob/master/CHANGELOG.md"},
  30. license="GPLv3+",
  31. keywords=[
  32. "IoT",
  33. "automation",
  34. "home-assistant",
  35. "home-automation",
  36. "lock",
  37. "mqtt",
  38. "shutdown",
  39. "systemd",
  40. ],
  41. classifiers=[
  42. # https://pypi.org/classifiers/
  43. "Development Status :: 4 - Beta",
  44. "Intended Audience :: End Users/Desktop",
  45. "Intended Audience :: System Administrators",
  46. "License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)",
  47. "Operating System :: POSIX :: Linux",
  48. # .github/workflows/python.yml
  49. "Programming Language :: Python :: 3.9",
  50. "Programming Language :: Python :: 3.10",
  51. "Programming Language :: Python :: 3.11",
  52. "Programming Language :: Python :: 3.12",
  53. "Programming Language :: Python :: 3.13",
  54. "Topic :: Home Automation",
  55. ],
  56. entry_points={
  57. "console_scripts": [
  58. "systemctl-mqtt = systemctl_mqtt:_main",
  59. ]
  60. },
  61. # >=3.6 variable type hints, f-strings & * to force keyword-only arguments
  62. # >=3.8 importlib.metadata
  63. python_requires=">=3.9", # <3.9 untested
  64. # > Currently, the only main loop supported by dbus-python is GLib.
  65. # https://web.archive.org/web/20241228081405/https://dbus.freedesktop.org/doc/dbus-python/tutorial.html#setting-up-an-event-loop
  66. # PyGObject depends on pycairo
  67. # > When pip-installing systemctl-mqtt on a system without graphics it
  68. # > fails as pycairo fails building.
  69. # https://web.archive.org/web/20241228083145/https://github.com/fphammerle/systemctl-mqtt/issues/39
  70. # > Jeepney is a pure Python D-Bus module. It consists of an IO-free core
  71. # > implementing the protocol, and integrations for both blocking I/O and
  72. # > for different asynchronous frameworks.
  73. # https://web.archive.org/web/20241206000411/https://www.freedesktop.org/wiki/Software/DBusBindings/
  74. install_requires=["aiomqtt>=2,<3", "jeepney>=0.8,<0.9"],
  75. setup_requires=["setuptools_scm"],
  76. tests_require=["pytest"],
  77. )