File tree Expand file tree Collapse file tree 6 files changed +73
-9
lines changed
support/__EMSCRIPTEN__.embed Expand file tree Collapse file tree 6 files changed +73
-9
lines changed Original file line number Diff line number Diff line change 179179 touch ${PYTHONPYCACHEPREFIX} /empty/$( $HPY -V| cut -f2 -d' ' )
180180
181181 # echo "#define HAVE_NCURSES_H" >> pyconfig.h
182+
182183 if echo $PYBUILD | grep -q 3.10
183184 then
184185 cat > Modules/Setup.local << END
@@ -203,9 +204,7 @@ _crypt
203204_ctypes _ctypes/_ctypes.c _ctypes/callbacks.c _ctypes/callproc.c _ctypes/stgdict.c _ctypes/cfield.c ${SDKROOT} /emsdk/upstream/emscripten/cache/sysroot/lib/wasm32-emscripten/pic/libffi.a
204205
205206END
206-
207-
208- fi
207+ fi
209208
210209 if emmake make -j$NPROC WASM_ASSETS_DIR=$( realpath ${PYTHONPYCACHEPREFIX} /empty) @/
211210 then
Original file line number Diff line number Diff line change 77" 1>&2
88
99
10- # use system packages.
10+ # install critical packages.
11+
12+
13+ # 3.12 and git deprecated setuptools bundling.
14+ $PIP install --upgrade setuptools
Original file line number Diff line number Diff line change @@ -17,6 +17,29 @@ PYPATCH=true
1717
1818[ -f $HPY ] || REBUILD=true
1919
20+ if echo $PYBUILD | grep -q 13$
21+ then
22+ if [ -d cpython${PYBUILD} ]
23+ then
24+ pushd cpython${PYBUILD} 2>&1 > /dev/null
25+ # put the tree back to original state so we can pull
26+ # Programs/python.c Modules/readline.c
27+ git restore .
28+
29+ if git pull| grep -q ' Already up to date'
30+ then
31+ export REBUILD=${REBUILD:- false}
32+ else
33+ export REBUILD=true
34+ fi
35+ # not here or pip won't install properly anymore its wheels
36+ # cat $ROOT/support/compilenone.py > ./Lib/compileall.py
37+ popd
38+ else
39+ git clone --no-tags --depth 1 --single-branch --branch main https://github.com/python/cpython.git cpython${PYBUILD}
40+ export REBUILD=true
41+ fi
42+ fi
2043
2144if echo $PYBUILD | grep -q 12$
2245then
3760 # cat $ROOT/support/compilenone.py > ./Lib/compileall.py
3861 popd
3962 else
40- git clone --no-tags --depth 1 --single-branch --branch main https://github.com/python/cpython.git cpython${PYBUILD}
63+ git clone --no-tags --depth 1 --single-branch --branch 3.12 https://github.com/python/cpython.git cpython${PYBUILD}
4164 export REBUILD=true
4265 fi
4366fi
7497
7598
7699# the sys._emscripten_info is actually not compatible with shared build
77- # just move its stuff to main
100+ # because it uses javascript inlines
101+ # just move it to main
78102
79103if $NOPATCH
80104then
81105 echo -n
82106else
83107 # do some patching for 3.11+ to allow more shared libs
84108 pushd src/cpython${PYBUILD} 2>&1 > /dev/null
85- patch -p1 < ../../support/__EMSCRIPTEN__.embed/cpython.diff
109+ patch -p1 < ../../support/__EMSCRIPTEN__.embed/cpython${PYBUILD} .diff
86110 popd 2>&1 > /dev/null
87111fi
88112
Original file line number Diff line number Diff line change 114114 # sdl2_image is too old
115115 ALL=" libembind libgl libal libhtml5 libstubs libnoexit libsockets"
116116 ALL=" $ALL libc libdlmalloc libcompiler_rt libc++-noexcept libc++abi-noexcept"
117- ALL=" $ALL struct_info libfetch zlib bzip2"
118- ALL=" $ALL libpng libjpeg freetype harfbuzz"
117+ ALL=" $ALL libfetch zlib bzip2 libpng libjpeg freetype harfbuzz"
119118 ALL=" $ALL sdl2 sdl2_mixer sdl2_gfx sdl2_ttf"
120119 ALL=" $ALL sqlite3"
121120
File renamed without changes.
Original file line number Diff line number Diff line change 1+ --- cpython/Python/sysmodule.c 2023-08-20 14:05:54.398071771 +0200
2+ +++ cpython3.12/Python/sysmodule.c 2023-08-20 14:04:34.785129849 +0200
3+ @@ -50,7 +50,7 @@
4+ extern const char *PyWin_DLLVersionString;
5+ #endif
6+
7+ - #ifdef __EMSCRIPTEN__
8+ + #if 0
9+ #include <emscripten.h>
10+ #endif
11+
12+ @@ -3136,7 +3136,7 @@
13+ return NULL;
14+ }
15+
16+ - #ifdef __EMSCRIPTEN__
17+ + #if 0
18+
19+ PyDoc_STRVAR(emscripten_info__doc__,
20+ "sys._emscripten_info\n\
21+ @@ -3368,7 +3368,7 @@
22+ goto type_init_failed;
23+ }
24+
25+ - #ifdef __EMSCRIPTEN__
26+ + #if 0
27+ if (EmscriptenInfoType == NULL) {
28+ EmscriptenInfoType = PyStructSequence_NewType(&emscripten_info_desc);
29+ if (EmscriptenInfoType == NULL) {
30+ @@ -3641,7 +3641,7 @@
31+ #endif
32+ _PyStructSequence_FiniBuiltin(interp, &Hash_InfoType);
33+ _PyStructSequence_FiniBuiltin(interp, &AsyncGenHooksType);
34+ - #ifdef __EMSCRIPTEN__
35+ + #if 0
36+ if (_Py_IsMainInterpreter(interp)) {
37+ Py_CLEAR(EmscriptenInfoType);
38+ }
You can’t perform that action at this time.
0 commit comments