Skip to content
This repository has been archived by the owner on Feb 14, 2024. It is now read-only.

Commit

Permalink
Iterate
Browse files Browse the repository at this point in the history
  • Loading branch information
martinRenou committed May 16, 2022
1 parent 6260682 commit 563b3e7
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 3 deletions.
7 changes: 6 additions & 1 deletion jupyterlite_xeus_python/env_build_addon.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def pre_build(self, manager):
"-c", "https://repo.mamba.pm/emscripten-forge",
"-c", "https://repo.mamba.pm/conda-forge",
# Mandatory packages for xeus-python to work
f"python={PYTHON_VERSION}", "ipython", "xeus-python-shell>=0.3",
f"python={PYTHON_VERSION}", "xeus-python",
*self.packages
], cwd=self.cwd.name)

Expand Down Expand Up @@ -104,6 +104,11 @@ def pre_build(self, manager):
name=f"copy:{file}",
actions=[(self.copy_one, [Path(self.cwd.name) / file, dest / file])],
)
for file in ["xpython_wasm.js", "xpython_wasm.wasm"]:
yield dict(
name=f"copy:{file}",
actions=[(self.copy_one, [Path(self.prefix.name) / "envs" / env_name / "bin" / file, dest / file])],
)

def post_build(self, manager):
"""Cleanup"""
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
],
entry_points={
"jupyterlite.addon.v0": [
"jupyterlite-xeus-python=jupyterlite_xeus_python.env_build_addon:XeusPythonEnvBuildAddon"
"jupyterlite-xeus-python=jupyterlite_xeus_python.env_build_addon:XeusPythonEnv"
]
}
)
Expand Down
2 changes: 1 addition & 1 deletion src/worker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ async function loadCppModule(moduleFactory: any): Promise<any> {

// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
await import('./python_data');
await require('./python_data');

await waitRunDependency();
raw_xkernel = new globalThis.Module.xkernel();
Expand Down
4 changes: 4 additions & 0 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ module.exports = {
plugins: [
new CopyPlugin({
patterns: [
{
from: 'src/xpython_wasm.js',
to: '.'
},
{
from: 'src/xpython_wasm.wasm',
to: '.'
Expand Down

0 comments on commit 563b3e7

Please sign in to comment.