Projet de remplacement du "RPiPasserelle" d'Otec.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

setup.py 8.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224
  1. """A setuptools based setup module.
  2. See:
  3. https://packaging.python.org/guides/distributing-packages-using-setuptools/
  4. https://github.com/pypa/sampleproject
  5. """
  6. # Always prefer setuptools over distutils
  7. from setuptools import setup, find_packages
  8. import pathlib
  9. import os
  10. __version__ = '__0.0.0__'
  11. with open('pyheatpump/__init__.py') as f:
  12. line = f.readline()
  13. __version__ = line.split("'")[1]
  14. here = pathlib.Path(__file__).parent.resolve()
  15. # Get the long description from the README file
  16. long_description = (here / 'README.md').read_text(encoding='utf-8')
  17. # Arguments marked as "Required" below must be included for upload to PyPI.
  18. # Fields marked as "Optional" may be commented out.
  19. def get_packages(package):
  20. """
  21. Return root package and all sub-packages.
  22. """
  23. return [
  24. dirpath
  25. for dirpath, dirnames, filenames in os.walk(package)
  26. if os.path.exists(os.path.join(dirpath, "__init__.py"))
  27. ]
  28. setup(
  29. # This is the name of your project. The first time you publish this
  30. # package, this name will be registered for you. It will determine how
  31. # users can install this project, e.g.:
  32. #
  33. # $ pip install sampleproject
  34. #
  35. # And where it will live on PyPI: https://pypi.org/project/sampleproject/
  36. #
  37. # There are some restrictions on what makes a valid project name
  38. # specification here:
  39. # https://packaging.python.org/specifications/core-metadata/#name
  40. name='pyHeatpump', # Required
  41. # Versions should comply with PEP 440:
  42. # https://www.python.org/dev/peps/pep-0440/
  43. #
  44. # For a discussion on single-sourcing the version across setup.py and the
  45. # project code, see
  46. # https://packaging.python.org/en/latest/single_source_version.html
  47. version=__version__, # Required
  48. # This is a one-line description or tagline of what your project does. This
  49. # corresponds to the "Summary" metadata field:
  50. # https://packaging.python.org/specifications/core-metadata/#summary
  51. description='pyHeatpump connects modbus to REST APIs', # Optional
  52. # This is an optional longer description of your project that represents
  53. # the body of text which users will see when they visit PyPI.
  54. #
  55. # Often, this is the same as your README, so you can just read it in from
  56. # that file directly (as we have already done above)
  57. #
  58. # This field corresponds to the "Description" metadata field:
  59. # https://packaging.python.org/specifications/core-metadata/#description-optional
  60. #long_description=long_description, # Optional
  61. # Denotes that our long_description is in Markdown; valid values are
  62. # text/plain, text/x-rst, and text/markdown
  63. #
  64. # Optional if long_description is written in reStructuredText (rst) but
  65. # required for plain-text or Markdown; if unspecified, "applications should
  66. # attempt to render [the long_description] as text/x-rst; charset=UTF-8 and
  67. # fall back to text/plain if it is not valid rst" (see link below)
  68. #
  69. # This field corresponds to the "Description-Content-Type" metadata field:
  70. # https://packaging.python.org/specifications/core-metadata/#description-content-type-optional
  71. #long_description_content_type='text/markdown', # Optional (see note above)
  72. # This should be a valid link to your project's main homepage.
  73. #
  74. # This field corresponds to the "Home-Page" metadata field:
  75. # https://packaging.python.org/specifications/core-metadata/#home-page-optional
  76. url='https://git.yannweb.net/maxime-alves/pyHeatpump', # Optional
  77. # This should be your name or the name of the organization which owns the
  78. # project.
  79. author='Maxime Alves', # Optional
  80. # This should be a valid email address corresponding to the author listed
  81. # above.
  82. author_email='maxime@freepoteries.fr', # Optional
  83. # Classifiers help users find your project by categorizing it.
  84. #
  85. # For a list of valid classifiers, see https://pypi.org/classifiers/
  86. # classifiers=[ # Optional
  87. # # How mature is this project? Common values are
  88. # # 3 - Alpha
  89. # # 4 - Beta
  90. # # 5 - Production/Stable
  91. # 'Development Status :: 3 - Alpha',
  92. #
  93. # # Indicate who your project is intended for
  94. # 'Intended Audience :: Developers',
  95. # 'Topic :: Software Development :: Build Tools',
  96. #
  97. # # Pick your license as you wish
  98. # 'License :: OSI Approved :: MIT License',
  99. #
  100. # # Specify the Python versions you support here. In particular, ensure
  101. # # that you indicate you support Python 3. These classifiers are *not*
  102. # # checked by 'pip install'. See instead 'python_requires' below.
  103. # 'Programming Language :: Python :: 3',
  104. # 'Programming Language :: Python :: 3.5',
  105. # 'Programming Language :: Python :: 3.6',
  106. # 'Programming Language :: Python :: 3.7',
  107. # 'Programming Language :: Python :: 3.8',
  108. # 'Programming Language :: Python :: 3 :: Only',
  109. # ],
  110. # This field adds keywords for your project which will appear on the
  111. # project page. What does your project relate to?
  112. #
  113. # Note that this is a list of additional keywords, separated
  114. # by commas, to be used to assist searching for the distribution in a
  115. # larger catalog.
  116. keywords='modbus, api', # Optional
  117. # When your source code is in a subdirectory under the project root, e.g.
  118. # `src/`, it is necessary to specify the `package_dir` argument.
  119. package_dir={'pyheatpump': 'pyheatpump'}, # Optional
  120. # You can just specify package directories manually here if your project is
  121. # simple. Or you can use find_packages().
  122. #
  123. # Alternatively, if you just want to distribute a single Python file, use
  124. # the `py_modules` argument instead as follows, which will expect a file
  125. # called `my_module.py` to exist:
  126. #
  127. # py_modules=["my_module"],
  128. #
  129. packages=get_packages('pyheatpump'), # Required
  130. # Specify which Python versions you support. In contrast to the
  131. # 'Programming Language' classifiers above, 'pip install' will check this
  132. # and refuse to install the project if the version does not match. See
  133. # https://packaging.python.org/guides/distributing-packages-using-setuptools/#python-requires
  134. python_requires='>=3.5, <4',
  135. # This field lists other packages that your project depends on to run.
  136. # Any package you put here will be installed by pip when your project is
  137. # installed, so they must be valid existing projects.
  138. #
  139. # For an analysis of "install_requires" vs pip's requirements files see:
  140. # https://packaging.python.org/en/latest/requirements.html
  141. install_requires=[
  142. 'starlette>=0.13,<1',
  143. 'uvicorn>=0.3.24,<1',
  144. 'umodbus>=1.0.3,<2',
  145. 'click>=7.0.0,<8',
  146. 'requests>=2.21.0,<3',
  147. 'netifaces>=0.10.0,<1'
  148. ],
  149. # List additional groups of dependencies here (e.g. development
  150. # dependencies). Users will be able to install these using the "extras"
  151. # syntax, for example:
  152. #
  153. # $ pip install sampleproject[dev]
  154. #
  155. # Similar to `install_requires` above, these must be valid existing
  156. # projects.
  157. extras_require={ # Optional
  158. 'test': ['pytest', 'asynctest', 'pytest-asyncio'],
  159. },
  160. # If there are data files included in your packages that need to be
  161. # installed, specify them here.
  162. package_data={ # Optional
  163. 'pyheatpump': [
  164. 'index.html',
  165. ],
  166. },
  167. # Although 'package_data' is the preferred approach, in some case you may
  168. # need to place data files outside of your packages. See:
  169. # http://docs.python.org/distutils/setupscript.html#installing-additional-files
  170. #
  171. # In this case, 'data_file' will be installed into '<sys.prefix>/my_data'
  172. # data_files=[('my_data', ['data/data_file'])], # Optional
  173. # To provide executable scripts, use entry points in preference to the
  174. # "scripts" keyword. Entry points provide cross-platform support and allow
  175. # `pip` to create the appropriate form of executable for the target
  176. # platform.
  177. #
  178. # For example, the following would provide a command called `sample` which
  179. # executes the function `main` from this package when invoked:
  180. entry_points={ # Optional
  181. 'console_scripts': [
  182. 'pyheatpump=pyheatpump.cli:cli',
  183. ],
  184. },
  185. # List additional URLs that are relevant to your project as a dict.
  186. #
  187. # This field corresponds to the "Project-URL" metadata fields:
  188. # https://packaging.python.org/specifications/core-metadata/#project-url-multiple-use
  189. #
  190. # Examples listed include a pattern for specifying where the package tracks
  191. # issues, where the source is hosted, where to say thanks to the package
  192. # maintainers, and where to support the project financially. The key is
  193. # what's used to render the link text on PyPI.
  194. project_urls={ # Optional
  195. },
  196. )