setup.py 3.0 KB

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