File tree Expand file tree Collapse file tree 7 files changed +72
-70
lines changed Expand file tree Collapse file tree 7 files changed +72
-70
lines changed Original file line number Diff line number Diff line change 44
55. ./scripts/emsdk-fetch.sh
66
7- # echo " ${PIMINOR}"|grep -q 11$
8- if true
9- then
10- HPFX=./devices/x86_64/usr/lib/python${PYBUILD}
11- rm ./devices/emsdk/usr/lib/python${PYBUILD} /ensurepip/_bundled/setuptools-* -py3-none-any.whl
12- cp -Rf $HPFX /setuptool* ./devices/emsdk/usr/lib/python${PYBUILD} /
13- cp -Rf $HPFX /_distutils* ./devices/emsdk/usr/lib/python${PYBUILD} /
14- cp -Rf $HPFX /pkg_resources ./devices/emsdk/usr/lib/python${PYBUILD} /
15- fi
7+ HPFX=./devices/x86_64/usr/lib/python${PYBUILD}
8+
9+ for moveit in setuptools distutils _distutils _distutils_hack pkg_resources
10+ do
11+ if [ -d $HPFX /site-packages/${moveit} ]
12+ then
13+ echo "
14+ * migrating ${moveit}
15+ "
16+ cp -rf $HPFX /site-packages/${moveit} $HPFX /
17+ cp -rf $HPFX /site-packages/${moveit} -* $HPFX /
18+ fi
19+ done
20+
21+
22+
1623
1724# ../../devices/x86_64/usr/bin/python3-wasm -mpip install .
1825# not working because python startup is skipped
Original file line number Diff line number Diff line change 2828 REBUILD=true
2929fi
3030
31+ # 3.10 is not wasm stable
32+ if [ -f support/__EMSCRIPTEN__.patches/${PYBUILD} .diff ]
33+ then
34+ pushd src/cpython 2>&1 > /dev/null
35+ patch -p1 < ../../support/__EMSCRIPTEN__.patches/${PYBUILD} .diff
36+ popd 2>&1 > /dev/null
37+ fi
3138
3239
3340if [ -f $EMSDK /upstream/emscripten/cache/sysroot/lib/wasm32-emscripten/pic/libffi.a ]
Original file line number Diff line number Diff line change @@ -21,7 +21,6 @@ $PIP install setuptools --upgrade
2121HPFX=./devices/x86_64/usr/lib/python${PYBUILD}
2222rm -rf $HPFX /ensurepip/_bundled/* -py3-none-any.whl
2323
24-
2524for moveit in setuptools _distutils _distutils_hack pkg_resources
2625do
2726 if [ -d $HPFX /site-packages/${moveit} ]
4140fi
4241
4342
44-
4543# https://github.com/aroberge/ideas, for code transformation
4644$PIP install token-utils
4745
Original file line number Diff line number Diff line change @@ -11,6 +11,8 @@ mkdir -p src
1111pushd src 2>&1 > /dev/null
1212
1313NOPATCH=false
14+ PYPATCH=true
15+
1416[ -L cpython ] && rm cpython
1517
1618[ -f $HPY ] || REBUILD=true
@@ -56,10 +58,15 @@ if echo $PYBUILD | grep -q 10$
5658then
5759 wget -q -c https://www.python.org/ftp/python/3.10.5/Python-3.10.5.tar.xz
5860 tar xf Python-3.10.5.tar.xz
59- ln -s Python-3.10.5 cpython
6061
61- # tar xfj /data/git/python-wasm-sdk/src/Python-3.10.5-pydk.tar.bz2
62- # ln -s Python-3.10.5-pydk cpython
62+ if [ -d Python-3.10.5-pydk ]
63+ then
64+ PYPATCH=false
65+ ln -s Python-3.10.5 cpython
66+ else
67+ PYPATCH=true
68+ ln -s Python-3.10.5 cpython
69+ fi
6370
6471 NOPATCH=true
6572 export REBUILD=true
7279if [ -f support/__EMSCRIPTEN__.patches/${PYBUILD} .diff ]
7380then
7481 pushd src/cpython 2>&1 > /dev/null
75- patch -p1 < ../../support/__EMSCRIPTEN__.patches/${PYBUILD} .diff
82+ patch -p1 < ../../support/__EMSCRIPTEN__.patches/${PYBUILD} -host .diff
7683 popd 2>&1 > /dev/null
7784fi
7885
86+
7987# the sys._emscripten_info is actually not compatible with shared build
8088# just move its stuff to main
8189
Original file line number Diff line number Diff line change @@ -84,6 +84,12 @@ IS_SHARED=false
8484for arg do
8585 shift
8686
87+ if [ "\$ arg" = "-v" ]
88+ then
89+ \$ EMSDK_PYTHON -E \$ 0.py -v
90+ exit 0
91+ fi
92+
8793 # that is for some very bad setup.py behaviour regarding cross compiling. should not be needed ..
8894 [ "\$ arg" = "-I/usr/include" ] && continue
8995 [ "\$ arg" = "-I/usr/include/SDL2" ] && continue
You can’t perform that action at this time.
0 commit comments