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

Commit c8ab476

Browse files
authored
Merge pull request #1 from martinRenou/remove_sleep
Remove sleep + renames according to jupyter-xeus/xeus-python#530
2 parents d28dbc1 + 7b7e3f8 commit c8ab476

File tree

5 files changed

+6
-11
lines changed

5 files changed

+6
-11
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
"build:dockerimage": "docker build -t mydockerimage --build-arg USER_ID=$(id -u) --build-arg GROUP_ID=$(id -g) . ",
3333
"build:dockerimage_no_cache": "docker build -t mydockerimage --build-arg USER_ID=$(id -u) --build-arg GROUP_ID=$(id -g) --no-cache . ",
3434
"build:emscripten": "echo $(pwd) && docker run --rm -v $(pwd):/src -u $(id -u):$(id -g) mydockerimage ./build.sh",
35-
"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",
35+
"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",
3636
"build:wasm": "jlpm run build:dockerimage && jlpm run build:emscripten",
3737
"build:wasm_no_cache": "jlpm run build:dockerimage_no_cache && jlpm run build:emscripten",
3838
"build": "jlpm run build:lib && jlpm run copy-files && jlpm run build:labextension:dev",

pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ build_cmd = "build:prod"
1414
npm = ["jlpm"]
1515

1616
[tool.check-manifest]
17-
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"]
17+
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"]

setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
.replace("-alpha.", "a")
3737
.replace("-beta.", "b")
3838
.replace("-rc.", "rc")
39-
)
39+
)
4040

4141
setup_args = dict(
4242
name=name,

src/worker.ts

+2-7
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ globalThis.Module = {}
1414

1515
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
1616
// @ts-ignore
17-
import createXeusModule from './xeus_kernel.js';
17+
import createXeusModule from './xpython_wasm.js';
1818
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
1919
// @ts-ignore
2020
// import populate from './python_data.js';
@@ -65,19 +65,14 @@ ctx.get_stdin = get_stdin;
6565
let resolveInputReply: any;
6666

6767

68-
function sleep(ms:number) {
69-
return new Promise(resolve => setTimeout(resolve, ms));
70-
}
71-
7268
async function loadCppModule(moduleFactory: any): Promise<any> {
7369
const options: any = {};
7470
globalThis.Module = await moduleFactory(options);
75-
71+
7672
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
7773
// @ts-ignore
7874
await import("./python_data");
7975

80-
await sleep(2000)
8176
await waitRunDependency();
8277
raw_xkernel = new globalThis.Module.xkernel();
8378
raw_xserver = raw_xkernel.get_server();

webpack.config.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ module.exports = {
55
new CopyPlugin({
66
patterns: [
77
{
8-
from: 'src/xeus_kernel.wasm',
8+
from: 'src/xpython_wasm.wasm',
99
to: '.'
1010
},
1111
{

0 commit comments

Comments
 (0)