setup.py 3.5 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.7",
  65. "Programming Language :: Python :: 3.8",
  66. "Programming Language :: Python :: 3.9",
  67. "Programming Language :: Python :: 3.10",
  68. "Programming Language :: Python :: 3.11",
  69. "Topic :: Home Automation",
  70. ],
  71. entry_points={"console_scripts": ["switchbot-mqtt = switchbot_mqtt._cli:_main"]},
  72. # >=3.6 variable type hints, f-strings, typing.Collection & * to force keyword-only arguments
  73. # >=3.7 postponed evaluation of type annotations (PEP563) & dataclass
  74. python_requires=">=3.7",
  75. install_requires=[
  76. # >=1.3.0 for btle.BTLEManagementError (could be replaced with BTLEException)
  77. # >=0.1.0 for btle.helperExe
  78. # https://github.com/IanHarvey/bluepy/tree/v/1.3.0#release-notes
  79. "bluepy>=1.3.0,<2",
  80. # >=0.10.0 for SwitchbotCurtain.{update,get_position}
  81. # >=0.9.0 for SwitchbotCurtain.set_position
  82. "PySwitchbot>=0.10.0,<0.13",
  83. "paho-mqtt<2",
  84. ],
  85. setup_requires=["setuptools_scm"],
  86. tests_require=["pytest"],
  87. )