setup.py 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  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. import json
  12. from pathlib import Path
  13. from setuptools import find_packages, setup
  14. root_folder = Path(__file__).parent
  15. readme = Path(root_folder / "README.md").read_text("UTF-8")
  16. version_path = "taipy/rest/version.json"
  17. setup_requirements = Path("taipy/rest/setup.requirements.txt")
  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. requirements = [r for r in (setup_requirements).read_text("UTF-8").splitlines() if r]
  24. setup(
  25. author="Avaiga",
  26. name="taipy-rest",
  27. keywords="taipy-rest",
  28. python_requires=">=3.9",
  29. version=version_string,
  30. author_email="dev@taipy.io",
  31. packages=find_packages(where=root_folder, include=["taipy", "taipy.rest", "taipy.rest.*"]),
  32. include_package_data=True,
  33. long_description=readme,
  34. long_description_content_type="text/markdown",
  35. description="Library to expose taipy-core REST APIs.",
  36. license="Apache License 2.0",
  37. classifiers=[
  38. "Intended Audience :: Developers",
  39. "License :: OSI Approved :: Apache Software License",
  40. "Natural Language :: English",
  41. "Programming Language :: Python :: 3",
  42. "Programming Language :: Python :: 3.9",
  43. "Programming Language :: Python :: 3.10",
  44. "Programming Language :: Python :: 3.11",
  45. "Programming Language :: Python :: 3.12",
  46. ],
  47. install_requires=requirements,
  48. )