From 10c7ddd728ab7d80a4a5e1b68466c44f10ada4f8 Mon Sep 17 00:00:00 2001 From: Mathieu Poumeyrol Date: Thu, 7 Mar 2024 17:00:14 +0100 Subject: [PATCH] rework copy so it happens only the first time (really ugly) --- api/py/MANIFEST.in | 1 + api/py/setup.py | 8 +++----- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/api/py/MANIFEST.in b/api/py/MANIFEST.in index 86f21c5743..4ec41f1db1 100644 --- a/api/py/MANIFEST.in +++ b/api/py/MANIFEST.in @@ -1 +1,2 @@ graft rust-workspace +graft docs diff --git a/api/py/setup.py b/api/py/setup.py index 0640afa3a2..2baa5f1ab1 100644 --- a/api/py/setup.py +++ b/api/py/setup.py @@ -5,14 +5,12 @@ import re import os -if os.path.exists("rust-workspace"): - shutil.rmtree("rust-workspace") - -shutil.copytree( +if not os.path.exists("rust-workspace"): + shutil.copytree( "../..", "rust-workspace", ignore = shutil.ignore_patterns(".cached", "target", ".git", "issue-*", ".travis", "assets", ".github", "py") -) + ) version = toml.load("rust-workspace/api/Cargo.toml")["package"]["version"] version = re.sub("\-alpha\.", "a", version)