setup.py 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. #!/usr/bin/env python
  2. # Copyright 2021-2024 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. version_path = "taipy/config/version.json"
  19. setup_requirements = Path("taipy/config/setup.requirements.txt")
  20. with open(version_path) as version_file:
  21. version = json.load(version_file)
  22. version_string = f'{version.get("major", 0)}.{version.get("minor", 0)}.{version.get("patch", 0)}'
  23. if vext := version.get("ext"):
  24. version_string = f"{version_string}.{vext}"
  25. requirements = [r for r in (setup_requirements).read_text("UTF-8").splitlines() if r]
  26. test_requirements = ["pytest>=3.8"]
  27. setup(
  28. author="Avaiga",
  29. author_email="dev@taipy.io",
  30. python_requires=">=3.8",
  31. classifiers=[
  32. "Intended Audience :: Developers",
  33. "License :: OSI Approved :: Apache Software License",
  34. "Natural Language :: English",
  35. "Programming Language :: Python :: 3",
  36. "Programming Language :: Python :: 3.8",
  37. "Programming Language :: Python :: 3.9",
  38. "Programming Language :: Python :: 3.10",
  39. "Programming Language :: Python :: 3.11",
  40. "Programming Language :: Python :: 3.12",
  41. ],
  42. description="A Taipy package dedicated to easily configure a Taipy application.",
  43. install_requires=requirements,
  44. long_description=readme,
  45. long_description_content_type="text/markdown",
  46. include_package_data=True,
  47. license="Apache License 2.0",
  48. keywords="taipy-config",
  49. name="taipy-config",
  50. packages=find_packages(
  51. where=root_folder, include=[
  52. "taipy", "taipy.config", "taipy.config.*", "taipy.logger", "taipy.logger.*", "taipy._cli", "taipy._cli.*"
  53. ]
  54. ),
  55. test_suite="tests",
  56. tests_require=test_requirements,
  57. url="https://github.com/avaiga/taipy-config",
  58. version=version_string,
  59. zip_safe=False,
  60. )