-
Notifications
You must be signed in to change notification settings - Fork 0
/
make.sh
executable file
·36 lines (21 loc) · 850 Bytes
/
make.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/bin/bash
WD=$(pwd)
[ -d hpy ] || git clone https://github.com/pmp-p/hpy-pygbag hpy
# need install to get the egg
pushd hpy
/opt/python-wasm-sdk/python3-wasm setup.py install
popd
pushd hpytest-module
export PYTHONPATH=$(echo -n ${WD}/hpy/build/lib.wasm32-*-emscripten-cpython-311)
/opt/python-wasm-sdk/python3-wasm setup.py build
popd
rm -rf hpy-pygbag/hpy hpy-pygbag/*so hpy-pygbag/*map
mv -v hpy/build/lib.wasm32-*-emscripten-cpython-311/hpy hpytest-module/build/lib.wasm32-*-emscripten-cpython-311/* hpy-pygbag/
if [ -f /pp ]
then
PYTHONPATH=/data/git/pygbag \
py -m pygbag --ume_block 0 --dev --git --template noctx.tmpl /data/git/pygbag/src/hpy/hpy-pygbag-test/hpy-pygbag/main.py
else
( sleep 3 && xdg-open "http://localhost:8000?-i" )&
pygbag --ume_block 0 --template noctx.tmpl --git hpy-pygbag/main.py
fi