setup.py 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. #!/usr/bin/env python
  2. # Copyright 2023 Avaiga Private Limited
  3. #
  4. # Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
  5. # the License. You may obtain a copy of the License at
  6. #
  7. # http://www.apache.org/licenses/LICENSE-2.0
  8. #
  9. # Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
  10. # an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
  11. # specific language governing permissions and limitations under the License.
  12. """The setup script."""
  13. import json
  14. from pathlib import Path
  15. from setuptools import find_packages, setup
  16. root_folder = Path(__file__).parent
  17. readme = Path(root_folder / "README.md").read_text("UTF-8")
  18. with open(root_folder / "taipy" / "config" / "version.json") as version_file:
  19. version = json.load(version_file)
  20. version_string = f'{version.get("major", 0)}.{version.get("minor", 0)}.{version.get("patch", 0)}'
  21. if vext := version.get("ext"):
  22. version_string = f"{version_string}.{vext}"
  23. requirements = [r for r in (root_folder / "setup.requirements.txt").read_text("UTF-8").splitlines() if r]
  24. test_requirements = ["pytest>=3.8"]
  25. setup(
  26. author="Avaiga",
  27. author_email="dev@taipy.io",
  28. python_requires=">=3.8",
  29. classifiers=[
  30. "Intended Audience :: Developers",
  31. "License :: OSI Approved :: Apache Software License",
  32. "Natural Language :: English",
  33. "Programming Language :: Python :: 3",
  34. "Programming Language :: Python :: 3.8",
  35. "Programming Language :: Python :: 3.9",
  36. "Programming Language :: Python :: 3.10",
  37. ],
  38. description="A Taipy package dedicated to easily configure a Taipy application.",
  39. install_requires=requirements,
  40. long_description=readme,
  41. long_description_content_type="text/markdown",
  42. include_package_data=True,
  43. license="Apache License 2.0",
  44. keywords="taipy-config",
  45. name="taipy-config",
  46. packages=find_packages(
  47. where=root_folder, include=["taipy", "taipy.config", "taipy.config.*", "taipy.logger", "taipy.logger.*"]
  48. ),
  49. test_suite="tests",
  50. tests_require=test_requirements,
  51. url="https://github.com/avaiga/taipy-config",
  52. version=version_string,
  53. zip_safe=False,
  54. )