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

Upgraded to xeus-python 0.15 #86

Merged
merged 1 commit into from
Dec 8, 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
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ RUN micromamba create -n xeus-python-kernel \
-c https://repo.mamba.pm/emscripten-forge \
-c https://repo.mamba.pm/conda-forge \
--yes \
python=$PYTHON_VERSION xeus-python
python=$PYTHON_VERSION xeus-python xeus-lite

RUN mkdir -p xeus-python-kernel && cd xeus-python-kernel && \
cp /tmp/xeus-python-kernel/envs/xeus-python-kernel/bin/xpython_wasm.js . && \
cp /tmp/xeus-python-kernel/envs/xeus-python-kernel/bin/xpython_wasm.wasm . && \
empack pack python core /tmp/xeus-python-kernel/envs/xeus-python-kernel --version=$PYTHON_VERSION
empack pack env --env-prefix /tmp/xeus-python-kernel/envs/xeus-python-kernel --outname python_data --config /opt/conda/share/empack/empack_config.yaml

COPY copy_output.sh .

Expand Down
3 changes: 3 additions & 0 deletions copy_output.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ cd /tmp/xeus-python-kernel
ls
cp *python*.{js,wasm,data} /src/src

cd /tmp/xeus-python-kernel/envs/xeus-python-kernel/share/xeus-lite
cp *.ts /src/src

echo "============================================="
echo "Compiling wasm bindings done"
echo "============================================="
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@
"build:prod": "jlpm run clean && jlpm run build:wasm && jlpm run build:lib && jlpm run build:worker:prod && jlpm run copy-files && jlpm run build:labextension",
"build:labextension": "jupyter labextension build .",
"build:labextension:dev": "jupyter labextension build --development True .",
"build:lib": "tsc",
"build:lib": " jlpm run sed-worker && tsc",
"sed-worker": "shx sed -i \"s/XEUS_KERNEL_FILE/'.\\/xlua_wasm.js'/\" src/worker.ts && shx sed -i \"s/LANGUAGE_DATA_FILE/''/\" src/worker.ts ",
"clean": "jlpm run clean:lib",
"clean:lib": "rimraf lib tsconfig.tsbuildinfo",
"clean:labextension": "rimraf jupyterlite_xeus_python/labextension",
Expand Down Expand Up @@ -76,7 +77,8 @@
"prettier": "^2.1.1",
"rimraf": "^3.0.2",
"source-map-loader": "^4.0.0",
"typescript": "~4.2.3"
"typescript": "~4.2.3",
"shx": "^0.3.0"
},
"sideEffects": [
"style/*.css",
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 = ["share/jupyter/labextensions/@jupyterlite/xeus-python-kernel/**", "yarn.lock", ".*", "package-lock.json", "Dockerfile", "src/xpython_wasm.js", "src/xpython_wasm.wasm", "src/python_data.data", "src/python_data.js", "*.sh"]
ignore = ["share/jupyter/labextensions/@jupyterlite/xeus-python-kernel/**", "yarn.lock", ".*", "package-lock.json", "Dockerfile", "src/xpython_wasm.js", "src/xpython_wasm.wasm", "src/python_data.data", "src/python_data.js", "src/worker.ts", "src/web_worker_kernel.ts", "*.sh"]
4 changes: 2 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {

import { IKernel, IKernelSpecs } from '@jupyterlite/kernel';

import { XeusServerKernel } from './xeus_server_kernel';
import { WebWorkerKernel } from './web_worker_kernel';

import logo32 from '!!file-loader?context=.!../style/logos/python-logo-32x32.png';
import logo64 from '!!file-loader?context=.!../style/logos/python-logo-64x64.png';
Expand All @@ -36,7 +36,7 @@ const server_kernel: JupyterLiteServerPlugin<void> = {
}
},
create: async (options: IKernel.IOptions): Promise<IKernel> => {
return new XeusServerKernel({
return new WebWorkerKernel({
...options,
mountDrive: serviceWorkerRegistrationWrapper.enabled
});
Expand Down
199 changes: 0 additions & 199 deletions src/worker.ts

This file was deleted.

Loading