diff --git a/.github/workflows/packaging.yml b/.github/workflows/packaging.yml index 7143068394..903d8b5966 100644 --- a/.github/workflows/packaging.yml +++ b/.github/workflows/packaging.yml @@ -34,7 +34,6 @@ jobs: - name: Install Taipy without dependencies run: | - cat tools/packages/taipy*/MANIFEST.in > MANIFEST.in pip install . rm -rf taipy diff --git a/setup.py b/setup.py index 69eb988be7..84d845a604 100644 --- a/setup.py +++ b/setup.py @@ -13,6 +13,7 @@ import json +import platform import subprocess from pathlib import Path @@ -23,12 +24,22 @@ readme = (root_folder / "README.md").read_text("UTF-8") +# get current version with open(root_folder / "taipy" / "version.json") as version_file: version = json.load(version_file) version_string = f'{version.get("major", 0)}.{version.get("minor", 0)}.{version.get("patch", 0)}' if vext := version.get("ext"): version_string = f"{version_string}.{vext}" +# build MANIFEST.in from tools/packages/taipy*/MANIFEST.in +with open(root_folder / "MANIFEST.in", "w") as man: + for pman in [ + dir / "MANIFEST.in" + for dir in (root_folder / "tools" / "packages").iterdir() + if dir.is_dir() and dir.stem.startswith("taipy") + ]: + man.write(pman.read_text("UTF-8")) + def get_requirements(): # get requirements from the different setups in tools/packages (removing taipy packages) @@ -55,7 +66,12 @@ def get_requirements(): class NPMInstall(build_py): def run(self): - subprocess.run(["python", "bundle_build.py"], cwd=root_folder / "tools" / "frontend", check=True, shell=True) + subprocess.run( + ["python", "bundle_build.py"], + cwd=root_folder / "tools" / "frontend", + check=True, + shell=platform.system() == "Windows", + ) build_py.run(self)