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

Remove sleep + renames according to https://github.com/jupyter-xeus/xeus-python/pull/530 #1

Merged
merged 2 commits into from
May 11, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
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 pyproject.toml
Original file line number Diff line number Diff line change
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 setup.py
Original file line number Diff line number Diff line change
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 src/worker.ts
Original file line number Diff line number Diff line change
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 webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ module.exports = {
new CopyPlugin({
patterns: [
{
from: 'src/xeus_kernel.wasm',
from: 'src/xpython_wasm.wasm',
to: '.'
},
{
Expand Down