setup.py 1.2 KB

123456789101112131415161718192021222324252627282930
  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 setup
  15. root_folder = Path(__file__).parent
  16. with open(root_folder / "taipy" / "core" / "version.json") as version_file:
  17. version = json.load(version_file)
  18. version_string = f'{version.get("major")}.{version.get("minor")}.{version.get("patch")}'
  19. if vext := version.get("ext"):
  20. version_string = f"{version_string}.{vext}"
  21. setup(
  22. version=version_string,
  23. install_requires=[r for r in (root_folder / "setup.requirements.txt").read_text("UTF-8").splitlines() if r]
  24. )