setup.py 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  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. root_folder = Path(__file__).parent
  17. readme = Path(root_folder / "README.md").read_text("UTF-8")
  18. with open(root_folder / "taipy" / "core" / "version.json") 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 (root_folder / "setup.requirements.txt").read_text("UTF-8").splitlines() if r]
  24. test_requirements = ["pytest>=3.8"]
  25. extras_require = {
  26. "fastparquet": ["fastparquet==2022.11.0"],
  27. "mssql": ["pyodbc>=4,<4.1"],
  28. "mysql": ["pymysql>1,<1.1"],
  29. "postgresql": ["psycopg2>2.9,<2.10"],
  30. }
  31. setup(
  32. author="Avaiga",
  33. author_email="dev@taipy.io",
  34. python_requires=">=3.8",
  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. description="A Python library to build powerful and customized data-driven back-end applications.",
  46. install_requires=requirements,
  47. long_description=readme,
  48. long_description_content_type="text/markdown",
  49. license="Apache License 2.0",
  50. keywords="taipy-core",
  51. name="taipy-core",
  52. packages=find_packages(where=root_folder, include=["taipy", "taipy.core", "taipy.core.*"]),
  53. include_package_data=True,
  54. test_suite="tests",
  55. tests_require=test_requirements,
  56. url="https://github.com/avaiga/taipy-core",
  57. version=version_string,
  58. zip_safe=False,
  59. extras_require=extras_require,
  60. )