setup.py 3.3 KB

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