From 68cacec8f041ba25d8e4df5153165443c3c9fa02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fred=20Lef=C3=A9v=C3=A8re-Laoide?= Date: Mon, 11 Dec 2023 12:35:50 +0100 Subject: [PATCH 1/4] compute global MANIFEST.in --- .github/workflows/packaging.yml | 1 - setup.py | 6 ++++++ 2 files changed, 6 insertions(+), 1 deletion(-) 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..999a51f2b9 100644 --- a/setup.py +++ b/setup.py @@ -23,12 +23,18 @@ 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) From 8ccfeeb2089fa8948156546c58aeadb678f62e54 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fred=20Lef=C3=A9v=C3=A8re-Laoide?= Date: Mon, 11 Dec 2023 12:51:30 +0100 Subject: [PATCH 2/4] format --- setup.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 999a51f2b9..3995907f24 100644 --- a/setup.py +++ b/setup.py @@ -32,7 +32,11 @@ # 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")]: + 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")) From eb79b78aa808dd021dbe72726849e2b802aacdb5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fred=20Lef=C3=A9v=C3=A8re-Laoide?= Date: Mon, 11 Dec 2023 15:04:45 +0100 Subject: [PATCH 3/4] no shell of *nix --- setup.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 3995907f24..b664ec174a 100644 --- a/setup.py +++ b/setup.py @@ -13,6 +13,7 @@ import json +import platform import subprocess from pathlib import Path @@ -65,7 +66,7 @@ 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) From 42007db7be9b243e143a04c25602acbebc5a1041 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fred=20Lef=C3=A9v=C3=A8re-Laoide?= Date: Mon, 11 Dec 2023 15:11:13 +0100 Subject: [PATCH 4/4] format --- setup.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index b664ec174a..84d845a604 100644 --- a/setup.py +++ b/setup.py @@ -66,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=platform.system() == "Windows") + subprocess.run( + ["python", "bundle_build.py"], + cwd=root_folder / "tools" / "frontend", + check=True, + shell=platform.system() == "Windows", + ) build_py.run(self)