Skip to content

Commit

Permalink
Merge pull request #1 from martinRenou/remove_sleep
Browse files Browse the repository at this point in the history
Remove sleep + renames according to jupyter-xeus#530
  • Loading branch information
martinRenou committed May 11, 2022
2 parents 72bbb62 + 253d6e6 commit 84eed71
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 11 deletions.
2 changes: 1 addition & 1 deletion lite/package.json
Expand Up @@ -32,7 +32,7 @@
"build:dockerimage": "docker build -t mydockerimage --build-arg USER_ID=$(id -u) --build-arg GROUP_ID=$(id -g) . ",
"build:dockerimage_no_cache": "docker build -t mydockerimage --build-arg USER_ID=$(id -u) --build-arg GROUP_ID=$(id -g) --no-cache . ",
"build:emscripten": "echo $(pwd) && docker run --rm -v $(pwd):/src -u $(id -u):$(id -g) mydockerimage ./build.sh",
"copy-files": "copyfiles -u 1 src/xeus_kernel.wasm src/xeus_kernel.worker.js src/xeus_kernel.js src/python_data.js src/python_data.data lib",
"copy-files": "copyfiles -u 1 src/xpython_wasm.wasm src/xpython_wasm.worker.js src/xpython_wasm.js src/python_data.js src/python_data.data lib",
"build:wasm": "jlpm run build:dockerimage && jlpm run build:emscripten",
"build:wasm_no_cache": "jlpm run build:dockerimage_no_cache && jlpm run build:emscripten",
"build": "jlpm run build:lib && jlpm run copy-files && jlpm run build:labextension:dev",
Expand Down
2 changes: 1 addition & 1 deletion lite/pyproject.toml
Expand Up @@ -14,4 +14,4 @@ build_cmd = "build:prod"
npm = ["jlpm"]

[tool.check-manifest]
ignore = ["jupyterlite_xeus_python/labextension/**", "yarn.lock", ".*", "package-lock.json", "Dockerfile", "src/xeus_python.worker.js", "src/xeus_kernel.js", "src/xeus_kernel.wasm", "*.sh"]
ignore = ["jupyterlite_xeus_python/labextension/**", "yarn.lock", ".*", "package-lock.json", "Dockerfile", "src/xeus_python.worker.js", "src/xpython_wasm.js", "src/xpython_wasm.wasm", "*.sh"]
2 changes: 1 addition & 1 deletion lite/setup.py
Expand Up @@ -36,7 +36,7 @@
.replace("-alpha.", "a")
.replace("-beta.", "b")
.replace("-rc.", "rc")
)
)

setup_args = dict(
name=name,
Expand Down
9 changes: 2 additions & 7 deletions lite/src/worker.ts
Expand Up @@ -14,7 +14,7 @@ globalThis.Module = {}

// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
import createXeusModule from './xeus_kernel.js';
import createXeusModule from './xpython_wasm.js';
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
// import populate from './python_data.js';
Expand Down Expand Up @@ -65,19 +65,14 @@ ctx.get_stdin = get_stdin;
let resolveInputReply: any;


function sleep(ms:number) {
return new Promise(resolve => setTimeout(resolve, ms));
}

async function loadCppModule(moduleFactory: any): Promise<any> {
const options: any = {};
globalThis.Module = await moduleFactory(options);

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

await sleep(2000)
await waitRunDependency();
raw_xkernel = new globalThis.Module.xkernel();
raw_xserver = raw_xkernel.get_server();
Expand Down
2 changes: 1 addition & 1 deletion lite/webpack.config.js
Expand Up @@ -5,7 +5,7 @@ module.exports = {
new CopyPlugin({
patterns: [
{
from: 'src/xeus_kernel.wasm',
from: 'src/xpython_wasm.wasm',
to: '.'
},
{
Expand Down

0 comments on commit 84eed71

Please sign in to comment.