Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
cd9505e
commit c01f661
Showing
8 changed files
with
171 additions
and
68 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -51,3 +51,6 @@ build/ | |
|
||
# Jupyter artefacts | ||
.ipynb_checkpoints/ | ||
|
||
# JS artifacts | ||
node_modules/ |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#bin/bash | ||
set -e | ||
|
||
micromamba create -n xeus-python-kernel --platform=emscripten-32 \ | ||
-c https://repo.mamba.pm/emscripten-forge \ | ||
-c https://repo.mamba.pm/conda-forge \ | ||
--yes \ | ||
python ipython pybind11 jedi xtl nlohmann_json pybind11_json numpy xeus xeus-python-shell | ||
|
||
rm -rf build | ||
mkdir build | ||
cd build | ||
|
||
export PREFIX=$MAMBA_ROOT_PREFIX/envs/xeus-python-kernel | ||
export CMAKE_PREFIX_PATH=$PREFIX | ||
export CMAKE_SYSTEM_PREFIX_PATH=$PREFIX | ||
|
||
emcmake cmake \ | ||
-DCMAKE_BUILD_TYPE=Release \ | ||
-DCMAKE_FIND_ROOT_PATH_MODE_PACKAGE=ON \ | ||
-DCMAKE_PROJECT_INCLUDE=overwriteProp.cmake \ | ||
-DXPYT_EMSCRIPTEN_WASM_BUILD=ON \ | ||
.. | ||
|
||
make -j5 | ||
|
||
emboa pack python core $MAMBA_ROOT_PREFIX/envs/xeus-python-kernel --version=3.10 | ||
|
||
cd .. | ||
|
||
# patch output | ||
python patch_it.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
name: xeus-python-wasm | ||
channels: | ||
- conda-forge | ||
dependencies: | ||
- cmake | ||
- pip | ||
- python=3.10 | ||
- yarn | ||
- click |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
{ | ||
"name": "xeus-python", | ||
"version": "0.13.7", | ||
"description": "The xeus-python kernel compiled to WASM", | ||
"keywords": [ | ||
"jupyter", | ||
"jupyterlab", | ||
"jupyter-kernel", | ||
"python" | ||
], | ||
"files": [ | ||
"build/python_data.js", | ||
"build/python_data.data", | ||
"build/xpython_wasm.js", | ||
"build/xpython_wasm.wasm" | ||
], | ||
"homepage": "https://github.com/jupyter-xeus/xeus-python", | ||
"bugs": { | ||
"url": "https://github.com/jupyter-xeus/xeus-python/issues" | ||
}, | ||
"license": "BSD-3-Clause", | ||
"main": "build/xpython_wasm.js", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/jupyter-xeus/xeus-python" | ||
}, | ||
"scripts": { | ||
"build": "yarn run clean && ./build_wasm.sh", | ||
"clean": "rimraf build/" | ||
}, | ||
"devDependencies": { | ||
"rimraf": "^2.6.2" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,9 @@ | ||
|
||
with open('./bld_ems/xpython_wasm.js', 'r') as f: | ||
with open('./build/xpython_wasm.js', 'r') as f: | ||
content = f.read() | ||
|
||
|
||
query = 'Module["preloadPlugins"].push(audioPlugin);' | ||
content = content.replace(query,'') | ||
content = content.replace(query, '') | ||
|
||
with open('./bld_ems/xpython_wasm.js', 'w') as f: | ||
with open('./build/xpython_wasm.js', 'w') as f: | ||
f.write(content) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. | ||
# yarn lockfile v1 | ||
|
||
|
||
balanced-match@^1.0.0: | ||
version "1.0.2" | ||
resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" | ||
integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== | ||
|
||
brace-expansion@^1.1.7: | ||
version "1.1.11" | ||
resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" | ||
integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== | ||
dependencies: | ||
balanced-match "^1.0.0" | ||
concat-map "0.0.1" | ||
|
||
concat-map@0.0.1: | ||
version "0.0.1" | ||
resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" | ||
integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= | ||
|
||
fs.realpath@^1.0.0: | ||
version "1.0.0" | ||
resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" | ||
integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8= | ||
|
||
glob@^7.1.3: | ||
version "7.2.0" | ||
resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.0.tgz#d15535af7732e02e948f4c41628bd910293f6023" | ||
integrity sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q== | ||
dependencies: | ||
fs.realpath "^1.0.0" | ||
inflight "^1.0.4" | ||
inherits "2" | ||
minimatch "^3.0.4" | ||
once "^1.3.0" | ||
path-is-absolute "^1.0.0" | ||
|
||
inflight@^1.0.4: | ||
version "1.0.6" | ||
resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" | ||
integrity sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk= | ||
dependencies: | ||
once "^1.3.0" | ||
wrappy "1" | ||
|
||
inherits@2: | ||
version "2.0.4" | ||
resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" | ||
integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== | ||
|
||
minimatch@^3.0.4: | ||
version "3.1.2" | ||
resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" | ||
integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== | ||
dependencies: | ||
brace-expansion "^1.1.7" | ||
|
||
once@^1.3.0: | ||
version "1.4.0" | ||
resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" | ||
integrity sha1-WDsap3WWHUsROsF9nFC6753Xa9E= | ||
dependencies: | ||
wrappy "1" | ||
|
||
path-is-absolute@^1.0.0: | ||
version "1.0.1" | ||
resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" | ||
integrity sha1-F0uSaHNVNP+8es5r9TpanhtcX18= | ||
|
||
rimraf@^2.6.2: | ||
version "2.7.1" | ||
resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.7.1.tgz#35797f13a7fdadc566142c29d4f07ccad483e3ec" | ||
integrity sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w== | ||
dependencies: | ||
glob "^7.1.3" | ||
|
||
wrappy@1: | ||
version "1.0.2" | ||
resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" | ||
integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8= |