1
0

setup.py 3.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  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__)
  33. .parent.joinpath("README.md")
  34. .read_text(encoding="utf8"),
  35. long_description_content_type="text/markdown",
  36. author="Fabian Peter Hammerle",
  37. author_email="fabian@hammerle.me",
  38. url=_REPO_URL,
  39. project_urls={"Changelog": _REPO_URL + "/blob/master/CHANGELOG.md"},
  40. license="GPLv3+",
  41. keywords=[
  42. "IoT",
  43. "automation",
  44. "bluetooth",
  45. "button",
  46. "click",
  47. "cover",
  48. "curtain",
  49. "home-assistant.io",
  50. "home-automation",
  51. "mqtt",
  52. "press",
  53. "push",
  54. "switchbot",
  55. ],
  56. classifiers=[
  57. # https://pypi.org/classifiers/
  58. "Development Status :: 3 - Alpha",
  59. "Intended Audience :: End Users/Desktop",
  60. "Intended Audience :: System Administrators",
  61. "License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)",
  62. "Operating System :: POSIX :: Linux",
  63. # .github/workflows/python.yml
  64. "Programming Language :: Python :: 3.9",
  65. "Programming Language :: Python :: 3.10",
  66. "Programming Language :: Python :: 3.11",
  67. "Topic :: Home Automation",
  68. ],
  69. entry_points={"console_scripts": ["switchbot-mqtt = switchbot_mqtt._cli:_main"]},
  70. # >=3.6 variable type hints, f-strings, typing.Collection & * to force keyword-only arguments
  71. # >=3.7 postponed evaluation of type annotations (PEP563) & asyncio.run
  72. # >=3.8 unittest.mock.AsyncMock
  73. # <=3.8 untested cause pySwitchbot v0.17.2 added constraint bleak-retry-connector>=1.1.1
  74. # requiring python>=3.9
  75. # https://web.archive.org/web/20231104212919/https://github.com/Danielhiversen/pySwitchbot/compare/0.17.1..0.17.2
  76. # https://web.archive.org/web/20231104212930/https://pypi.org/project/bleak-retry-connector/1.1.1/
  77. python_requires=">=3.9",
  78. install_requires=[
  79. "bleak<0.22",
  80. # v0.14.0 replaced bluepy with bleak
  81. # https://github.com/Danielhiversen/pySwitchbot/pull/32
  82. "PySwitchbot>=0.14.0,<0.41",
  83. "aiomqtt<2",
  84. ],
  85. setup_requires=["setuptools_scm"],
  86. tests_require=["pytest"],
  87. )