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