setup.py 2.2 KB

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