setup.py 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. # Copyright 2021-2024 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. import os
  14. from setuptools import find_namespace_packages, find_packages, setup
  15. with open("README.md", "rb") as readme_file:
  16. readme = readme_file.read().decode("UTF-8")
  17. version_path = os.path.join(os.path.dirname(os.path.abspath(__file__)), "version.json")
  18. with open(version_path) 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. test_requirements = ["pytest>=3.8"]
  24. setup(
  25. author="Avaiga",
  26. author_email="dev@taipy.io",
  27. python_requires=">=3.9",
  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.9",
  34. "Programming Language :: Python :: 3.10",
  35. "Programming Language :: Python :: 3.11",
  36. "Programming Language :: Python :: 3.12",
  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. packages=find_namespace_packages(where=".") + find_packages(include=["taipy"]),
  45. include_package_data=True,
  46. data_files=[('version', ['version.json'])],
  47. test_suite="tests",
  48. url="https://github.com/avaiga/taipy-templates",
  49. version=version_string,
  50. zip_safe=False,
  51. )