7
7
on_rtd = os .environ .get ('READTHEDOCS' , None ) == 'True'
8
8
9
9
if on_rtd :
10
+ XEUS_CPP_ROOT = os .path .abspath ('../..' )
11
+ command_emscripten = 'cd ..;\
12
+ mamba init;\
13
+ mamba create -f environment-wasm-build.yml -y;\
14
+ mamba activate xeus-cpp-wasm-build;\
15
+ mamba create -f environment-wasm-host.yml --platform=emscripten-wasm32;\
16
+ mkdir build;\
17
+ cd build;\
18
+ export BUILD_PREFIX=$MAMBA_ROOT_PREFIX/envs/xeus-cpp-wasm-build;\
19
+ export PREFIX=$MAMBA_ROOT_PREFIX/envs/xeus-cpp-wasm-host;\
20
+ export SYSROOT_PATH=$BUILD_PREFIX/opt/emsdk/upstream/emscripten/cache/sysroot;\
21
+ emcmake cmake -DCMAKE_BUILD_TYPE=Release \
22
+ -DCMAKE_PREFIX_PATH=$PREFIX \
23
+ -DCMAKE_INSTALL_PREFIX=$PREFIX \
24
+ -DXEUS_CPP_EMSCRIPTEN_WASM_BUILD=ON \
25
+ -DCMAKE_FIND_ROOT_PATH_MODE_PACKAGE=ON \
26
+ -DXEUS_CPP_RESOURCE_DIR=$LLVM_BUILD_DIR/lib/clang/$LLVM_VERSION \
27
+ -DSYSROOT_PATH=$SYSROOT_PATH \
28
+ {0}/xeus-cpp/;\
29
+ emmake make -j $(nproc --all) install;\
30
+ cd {0};\
31
+ mamba create -n xeus-lite-host jupyterlite-core -c conda-forge;\
32
+ mamba activate xeus-lite-host;\
33
+ python -m pip install jupyterlite-xeus jupyter_server;\
34
+ jupyter lite build --XeusAddon.prefix=$PREFIX \
35
+ --contents notebooks/xeus-cpp-lite-demo.ipynb \
36
+ --contents notebooks/smallpt.ipynb \
37
+ --contents notebooks/images/marie.png \
38
+ --contents notebooks/audio/audio.wav \
39
+ --output-dir $READTHEDOCS_OUTPUT/html/xeus-cpp;' .format (XEUS_CPP_ROOT )
10
40
subprocess .call ('cd ..; doxygen' , shell = True )
41
+ subprocess .call (command_emscripten .format (XEUS_CPP_ROOT ), shell = True )
42
+
11
43
12
44
import sphinx_rtd_theme
13
45
@@ -32,4 +64,4 @@ def setup(app):
32
64
highlight_language = 'c++'
33
65
pygments_style = 'sphinx'
34
66
todo_include_todos = False
35
- htmlhelp_basename = 'xeus-cppdoc'
67
+ htmlhelp_basename = 'xeus-cppdoc'
0 commit comments