Skip to content

Commit

Permalink
require pyjs >= 1.0.0 (#588)
Browse files Browse the repository at this point in the history
* use pyjs 1.0.0

* use pyjs 1.0.0

* fixed typo

* removed outdated things

* fixed missing dir

* Update main.yml
  • Loading branch information
DerThorsten committed Apr 21, 2023
1 parent 95d240f commit 81b6c95
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 18 deletions.
25 changes: 13 additions & 12 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -178,24 +178,29 @@ jobs:
environment-file: environment-wasm-build.yml
environment-name: xeus-python-wasm-build

- name: Setup emsdk

- name: "setup emsdk"
shell: bash -l {0}
run: |
micromamba activate xeus-python-wasm-build
emsdk install ${{matrix.emsdk_ver}}
cd $HOME
git clone https://github.com/emscripten-core/emsdk.git
cd emsdk
./emsdk install ${{ matrix.emsdk_ver }}
./emsdk activate ${{ matrix.emsdk_ver }}
- name: Build and pack xeus-python
run: |
micromamba activate xeus-python-wasm-build
emsdk activate ${{matrix.emsdk_ver}}
source $CONDA_EMSDK_DIR/emsdk_env.sh
$HOME/emsdk/emsdk activate ${{matrix.emsdk_ver}}
source $HOME/emsdk/emsdk_env.sh
micromamba create -f environment-wasm-host.yml --platform=emscripten-32
mkdir build
pushd build
export EMPACK_PREFIX=$MAMBA_ROOT_PREFIX/envs/xeus-python-wasm-build
export PREFIX=$MAMBA_ROOT_PREFIX/envs/xeus-python-wasm-host
export CMAKE_PREFIX_PATH=$PREFIX
export CMAKE_SYSTEM_PREFIX_PATH=$PREFIX
Expand All @@ -206,12 +211,9 @@ jobs:
-DXPYT_EMSCRIPTEN_WASM_BUILD=ON \
..
make -j5
empack pack env --env-prefix $PREFIX --outname python_data --config $EMPACK_PREFIX/share/empack/empack_config.yaml
make -j5
popd
# Patch output
python wasm_patches/patch_it.py
Expand All @@ -221,5 +223,4 @@ jobs:
path: |
build/xpython_wasm.js
build/xpython_wasm.wasm
build/python_data.js
build/python_data.data
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ set(xeus-zmq_REQUIRED_VERSION 1.0.1)
set(xeus-lite_REQUIRED_VERSION 1.0.1)
set(pybind11_REQUIRED_VERSION 2.6.1)
set(pybind11_json_REQUIRED_VERSION 0.2.8)
set(pyjs_REQUIRED_VERSION 0.18.2)
set(pyjs_REQUIRED_VERSION 1.0.0)

if (NOT TARGET xtl)
find_package(xtl ${xtl_REQUIRED_VERSION} REQUIRED)
Expand Down
4 changes: 1 addition & 3 deletions environment-wasm-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,4 @@ dependencies:
- pip
- python=3.10
- yarn
- click
- emsdk >=3.1.11
- empack >=2.0.1
- click
4 changes: 2 additions & 2 deletions environment-wasm-host.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ dependencies:
- xeus-lite
- xeus
- xeus-python-shell>=0.5
- pyjs>=0.18.2
- requests-wasm-polyfill>=0.1.5
- pyjs>=1.0.0
- requests-wasm-polyfill>=0.3.0
- libpython

0 comments on commit 81b6c95

Please sign in to comment.