setup.py 3.3 KB

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