Skip to content

Commit 10a1bed

Browse files
committed
3.1.45pre (3.12)
1 parent 163dc7e commit 10a1bed

File tree

6 files changed

+73
-9
lines changed

6 files changed

+73
-9
lines changed

scripts/cpython-build-emsdk.sh

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,7 @@ END
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
205206
END
206-
207-
208-
fi
207+
fi
209208

210209
if emmake make -j$NPROC WASM_ASSETS_DIR=$(realpath ${PYTHONPYCACHEPREFIX}/empty)@/
211210
then

scripts/cpython-build-host-deps.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,8 @@ echo "
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

scripts/cpython-fetch.sh

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff 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

2144
if echo $PYBUILD |grep -q 12$
2245
then
@@ -37,7 +60,7 @@ then
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
4366
fi
@@ -74,15 +97,16 @@ fi
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

79103
if $NOPATCH
80104
then
81105
echo -n
82106
else
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
87111
fi
88112

scripts/emsdk-fetch.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,7 @@ END
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

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
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+
}

0 commit comments

Comments
 (0)