From c7dcc95ae467ad8362736ee5d2c04b593d60a27a Mon Sep 17 00:00:00 2001 From: Brett Cannon Date: Wed, 22 Nov 2023 12:38:15 -0800 Subject: [PATCH] Don't accidentally delete the checkout --- Tools/wasm/wasi.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Tools/wasm/wasi.py b/Tools/wasm/wasi.py index deeb1582f3601b..84d3f067ff8b89 100644 --- a/Tools/wasm/wasi.py +++ b/Tools/wasm/wasi.py @@ -75,12 +75,12 @@ def build_platform(): return sysconfig.get_config_var("BUILD_GNU_TYPE") -@subdir(CHECKOUT) -def prep_checkout(context, working_dir): +# Don't use subdir(); it will delete the checkout! +def prep_checkout(context): """Prepare the source checkout for cross-compiling.""" # Without `Setup.local`, in-place execution fails to realize it's in a # build tree/checkout (the dreaded "No module named 'encodings'" error). - local_setup = working_dir / "Modules" / "Setup.local" + local_setup = CHECKOUT / "Modules" / "Setup.local" if local_setup.exists(): print("Modules/Setup.local already exists ...") else: