setup.py 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. #!/usr/bin/env python
  2. # Copyright 2021-2024 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. root_folder = Path(__file__).parent
  17. readme = Path(root_folder / "README.md").read_text("UTF-8")
  18. version_path = "taipy/core/version.json"
  19. setup_requirements = Path("taipy/core/setup.requirements.txt")
  20. with open(version_path) as version_file:
  21. version = json.load(version_file)
  22. version_string = f'{version.get("major", 0)}.{version.get("minor", 0)}.{version.get("patch", 0)}'
  23. if vext := version.get("ext"):
  24. version_string = f"{version_string}.{vext}"
  25. requirements = [r for r in (setup_requirements).read_text("UTF-8").splitlines() if r]
  26. test_requirements = ["pytest>=3.8"]
  27. extras_require = {
  28. "fastparquet": ["fastparquet==2022.11.0"],
  29. "mssql": ["pyodbc>=4,<4.1"],
  30. "mysql": ["pymysql>1,<1.1"],
  31. "postgresql": ["psycopg2>2.9,<2.10"],
  32. }
  33. setup(
  34. author="Avaiga",
  35. author_email="dev@taipy.io",
  36. python_requires=">=3.9",
  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. description="A Python library to build powerful and customized data-driven back-end applications.",
  48. install_requires=requirements,
  49. long_description=readme,
  50. long_description_content_type="text/markdown",
  51. license="Apache License 2.0",
  52. keywords="taipy-core",
  53. name="taipy-core",
  54. packages=find_packages(where=root_folder, include=["taipy", "taipy.core", "taipy.core.*"]),
  55. include_package_data=True,
  56. test_suite="tests",
  57. tests_require=test_requirements,
  58. url="https://github.com/avaiga/taipy-core",
  59. version=version_string,
  60. zip_safe=False,
  61. extras_require=extras_require,
  62. )