setup.py 2.3 KB

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