From 092a4c99a1c1a2e66ec086fa11bd8bd13d28d6d8 Mon Sep 17 00:00:00 2001 From: DerThorsten Date: Mon, 13 Nov 2023 13:08:31 +0100 Subject: [PATCH] no not copy wasm --- lite/jupyterlite_xeus_python/build.py | 14 ++++++++------ lite/jupyterlite_xeus_python/env_build_addon.py | 1 + 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/lite/jupyterlite_xeus_python/build.py b/lite/jupyterlite_xeus_python/build.py index 9e5151a8..2ddf7cf9 100644 --- a/lite/jupyterlite_xeus_python/build.py +++ b/lite/jupyterlite_xeus_python/build.py @@ -242,6 +242,7 @@ def build_and_pack_emscripten_env( # noqa: C901, PLR0912, PLR0915 build_worker: bool = False, force: bool = False, log=None, + extension_mode: bool = False, ): """Build a conda environment for the emscripten platform and pack it with empack.""" if packages is None: @@ -344,11 +345,12 @@ def build_and_pack_emscripten_env( # noqa: C901, PLR0912, PLR0915 ) # Copy xeus-python output - for file in ["xpython_wasm.js", "xpython_wasm.wasm"]: - if not XEUS_PYTHON_LOCAL_BUILD: - shutil.copyfile(prefix_path / "bin" / file, Path(output_path) / file) - else: - shutil.copyfile(XEUS_PYTHON_BUILD_DIR / file, Path(output_path) / file) + if not extension_mode: + for file in ["xpython_wasm.js", "xpython_wasm.wasm"]: + if not XEUS_PYTHON_LOCAL_BUILD: + shutil.copyfile(prefix_path / "bin" / file, Path(output_path) / file) + else: + shutil.copyfile(XEUS_PYTHON_BUILD_DIR / file, Path(output_path) / file) # Copy worker code and process it if build_worker: @@ -448,4 +450,4 @@ def start(): if __name__ == "__main__": # raise NotImplementedError() build_all() - raise NotImplementedError() + #raise NotImplementedError() diff --git a/lite/jupyterlite_xeus_python/env_build_addon.py b/lite/jupyterlite_xeus_python/env_build_addon.py index 684d60ad..99e12e74 100644 --- a/lite/jupyterlite_xeus_python/env_build_addon.py +++ b/lite/jupyterlite_xeus_python/env_build_addon.py @@ -72,6 +72,7 @@ def post_build(self, manager): empack_config=self.empack_config, output_path=self.cwd.name, log=self.log, + extension_mode=True, ) # Find the federated extensions in the emscripten-env and install them