setup.py 3.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  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 for taipy-core package"""
  12. import json
  13. from pathlib import Path
  14. from setuptools import find_packages, setup
  15. root_folder = Path(__file__).parent
  16. package_desc = Path(root_folder / "package_desc.md").read_text("UTF-8")
  17. version_path = "taipy/core/version.json"
  18. setup_requirements = Path("taipy/core/setup.requirements.txt")
  19. with open(version_path) 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 = [r for r in (setup_requirements).read_text("UTF-8").splitlines() if r]
  25. test_requirements = ["pytest>=3.8"]
  26. extras_require = {
  27. "fastparquet": ["fastparquet==2022.11.0"],
  28. "mssql": ["pyodbc>=4,<4.1"],
  29. "mysql": ["pymysql>1,<1.1"],
  30. "postgresql": ["psycopg2>2.9,<2.10"],
  31. }
  32. setup(
  33. author="Avaiga",
  34. author_email="dev@taipy.io",
  35. python_requires=">=3.8",
  36. classifiers=[
  37. "Development Status :: 5 - Production/Stable",
  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.8",
  43. "Programming Language :: Python :: 3.9",
  44. "Programming Language :: Python :: 3.10",
  45. "Programming Language :: Python :: 3.11",
  46. "Programming Language :: Python :: 3.12",
  47. "Topic :: Software Development",
  48. "Topic :: Scientific/Engineering",
  49. "Operating System :: Microsoft :: Windows",
  50. "Operating System :: POSIX",
  51. "Operating System :: Unix",
  52. "Operating System :: MacOS",
  53. ],
  54. description="A Python library to build powerful and customized data-driven back-end applications.",
  55. install_requires=requirements,
  56. long_description=package_desc,
  57. long_description_content_type="text/markdown",
  58. license="Apache License 2.0",
  59. keywords="taipy-core",
  60. name="taipy-core",
  61. packages=find_packages(where=root_folder, include=["taipy", "taipy.core", "taipy.core.*"]),
  62. include_package_data=True,
  63. test_suite="tests",
  64. tests_require=test_requirements,
  65. version=version_string,
  66. zip_safe=False,
  67. extras_require=extras_require,
  68. project_urls={
  69. "Homepage": "https://www.taipy.io",
  70. "Documentation": "https://docs.taipy.io",
  71. "Source": "https://github.com/Avaiga/taipy",
  72. "Download": "https://pypi.org/project/taipy/#files",
  73. "Tracker": "https://github.com/Avaiga/taipy/issues",
  74. "Release notes": "https://docs.taipy.io/en/latest/relnotes/",
  75. },
  76. )