Skip to content

Commit f1c3ed9

Browse files
authored
Update Emscripten instructions to match xeus-cpp in where dependencies are installed from + mount tag files (no longer preloaded in xeus-cpp) (#618)
1 parent 360a117 commit f1c3ed9

File tree

4 files changed

+33
-9
lines changed

4 files changed

+33
-9
lines changed

.github/workflows/deploy-pages.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -238,10 +238,15 @@ jobs:
238238
shell: bash -l {0}
239239
run: |
240240
cd ./xeus-cpp/
241-
micromamba create -n xeus-lite-host jupyterlite-core -c conda-forge
241+
micromamba create -n xeus-lite-host jupyterlite-core=0.6 jupyterlite-xeus jupyter_server jupyterlab notebook python-libarchive-c -c conda-forge
242242
micromamba activate xeus-lite-host
243-
python -m pip install jupyterlite-xeus jupyterlite-core jupyterlab notebook libarchive-c
244-
jupyter lite build --XeusAddon.prefix=${{ env.PREFIX }} --contents notebooks/xeus-cpp-lite-demo.ipynb --contents notebooks/smallpt.ipynb --contents notebooks/images/marie.png --contents notebooks/audio/audio.wav --output-dir dist
243+
jupyter lite build --XeusAddon.prefix=${{ env.PREFIX }} \
244+
--contents notebooks/xeus-cpp-lite-demo.ipynb \
245+
--contents notebooks/smallpt.ipynb \
246+
--contents notebooks/images/marie.png \
247+
--contents notebooks/audio/audio.wav \
248+
--XeusAddon.mounts="${{ env.PREFIX }}/share/xeus-cpp/tagfiles:/share/xeus-cpp/tagfiles" \
249+
--XeusAddon.mounts="${{ env.PREFIX }}/etc/xeus-cpp/tags.d:/etc/xeus-cpp/tags.d" --output-dir dist
245250
246251
- name: Upload artifact
247252
uses: actions/upload-pages-artifact@v3

.github/workflows/emscripten.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -830,3 +830,12 @@ jobs:
830830
micromamba activate CppInterOp-wasm
831831
cd ./xeus-cpp/build/test
832832
node test_xeus_cpp.js
833+
834+
- name: Jupyter Lite integration
835+
if: ${{ runner.os != 'windows' }}
836+
shell: bash -l {0}
837+
run: |
838+
cd ./xeus-cpp/
839+
micromamba create -n xeus-lite-host jupyterlite-core=0.6 jupyterlite-xeus jupyter_server jupyterlab notebook python-libarchive-c -c conda-forge
840+
micromamba activate xeus-lite-host
841+
jupyter lite build --XeusAddon.prefix=${{ env.PREFIX }} --contents notebooks/xeus-cpp-lite-demo.ipynb --contents notebooks/smallpt.ipynb --contents notebooks/images/marie.png --contents notebooks/audio/audio.wav --output-dir dist

Emscripten-build-instructions.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -316,10 +316,15 @@ To build Jupyter Lite website with this kernel locally that you can use for test
316316

317317
```bash
318318
cd ../..
319-
micromamba create -n xeus-lite-host jupyterlite-core -c conda-forge
319+
micromamba create -n xeus-lite-host jupyterlite-core=0.6 jupyterlite-xeus jupyter_server jupyterlab notebook python-libarchive-c -c conda-forge
320320
micromamba activate xeus-lite-host
321-
python -m pip install jupyterlite-xeus jupyter_server
322-
jupyter lite build --XeusAddon.prefix=$PREFIX --contents xeus-cpp/notebooks/xeus-cpp-lite-demo.ipynb --contents notebooks/smallpt.ipynb --contents notebooks/images/marie.png --contents notebooks/audio/audio.wav
321+
jupyter lite build --XeusAddon.prefix=$PREFIX \
322+
--contents xeus-cpp/notebooks/xeus-cpp-lite-demo.ipynb \
323+
--contents xeus-cpp/notebooks/smallpt.ipynb \
324+
--contents xeus-cpp/notebooks/images/marie.png \
325+
--contents xeus-cpp/notebooks/audio/audio.wav \
326+
--XeusAddon.mounts="$PREFIX/share/xeus-cpp/tagfiles:/share/xeus-cpp/tagfiles" \
327+
--XeusAddon.mounts="$PREFIX/etc/xeus-cpp/tags.d:/etc/xeus-cpp/tags.d"
323328
```
324329

325330
Once the Jupyter Lite site has built you can test the website locally by executing

docs/Emscripten-build-instructions.rst

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -341,10 +341,15 @@ for testing execute the following
341341
.. code:: bash
342342
343343
cd ../..
344-
micromamba create -n xeus-lite-host jupyterlite-core -c conda-forge
344+
micromamba create -n xeus-lite-host jupyterlite-core=0.6 jupyterlite-xeus jupyter_server jupyterlab notebook python-libarchive-c -c conda-forge
345345
micromamba activate xeus-lite-host
346-
python -m pip install jupyterlite-xeus jupyter_server
347-
jupyter lite build --XeusAddon.prefix=$PREFIX --contents xeus-cpp/notebooks/xeus-cpp-lite-demo.ipynb --contents notebooks/smallpt.ipynb --contents notebooks/images/marie.png --contents notebooks/audio/audio.wav
346+
jupyter lite build --XeusAddon.prefix=$PREFIX \
347+
--contents xeus-cpp/notebooks/xeus-cpp-lite-demo.ipynb \
348+
--contents xeus-cpp/notebooks/smallpt.ipynb \
349+
--contents xeus-cpp/notebooks/images/marie.png \
350+
--contents xeus-cpp/notebooks/audio/audio.wav \
351+
--XeusAddon.mounts="$PREFIX/share/xeus-cpp/tagfiles:/share/xeus-cpp/tagfiles" \
352+
--XeusAddon.mounts="$PREFIX/etc/xeus-cpp/tags.d:/etc/xeus-cpp/tags.d"
348353
349354
Once the Jupyter Lite site has built you can test the website locally by
350355
executing

0 commit comments

Comments
 (0)