setup.py 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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. 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. with open(root_folder / "taipy" / "rest" / "version.json") as version_file:
  17. version = json.load(version_file)
  18. version_string = f'{version.get("major", 0)}.{version.get("minor", 0)}.{version.get("patch", 0)}'
  19. if vext := version.get("ext"):
  20. version_string = f"{version_string}.{vext}"
  21. requirements = [r for r in (root_folder / "setup.requirements.txt").read_text("UTF-8").splitlines() if r]
  22. setup(
  23. author="Avaiga",
  24. name="taipy-rest",
  25. keywords="taipy-rest",
  26. python_requires=">=3.8",
  27. version=version_string,
  28. author_email="dev@taipy.io",
  29. packages=find_packages(where=root_folder, include=["taipy", "taipy.rest", "taipy.rest.*"]),
  30. include_package_data=True,
  31. long_description=readme,
  32. long_description_content_type="text/markdown",
  33. description="Library to expose taipy-core REST APIs.",
  34. license="Apache License 2.0",
  35. classifiers=[
  36. "Intended Audience :: Developers",
  37. "License :: OSI Approved :: Apache Software License",
  38. "Natural Language :: English",
  39. "Programming Language :: Python :: 3",
  40. "Programming Language :: Python :: 3.8",
  41. "Programming Language :: Python :: 3.9",
  42. "Programming Language :: Python :: 3.10",
  43. "Programming Language :: Python :: 3.11",
  44. ],
  45. install_requires=requirements,
  46. )