Skip to content

Commit 002166e

Browse files
committed
3.1.45pre
1 parent 9881f68 commit 002166e

File tree

2 files changed

+25
-10
lines changed

2 files changed

+25
-10
lines changed

scripts/cpython-build-emsdk.sh

Lines changed: 23 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ END
166166
# --with-libs='-lz -lffi' \
167167

168168

169-
CONFIG_SITE=$ROOT/src/cpython${PYBUILD}/Tools/wasm/config.site-wasm32-pydk \
169+
PKG_CONFIG_PATH="${PREFIX}/lib/pkgconfig" CONFIG_SITE=$ROOT/src/cpython${PYBUILD}/Tools/wasm/config.site-wasm32-pydk \
170170
emconfigure $ROOT/src/cpython${PYBUILD}/configure -C --with-emscripten-target=browser \
171171
--cache-file=${PYTHONPYCACHEPREFIX}/config.cache \
172172
--enable-wasm-dynamic-linking $TESTSUITE\
@@ -192,33 +192,47 @@ curses
192192
*static*
193193
zlib zlibmodule.c
194194
END
195-
# _ctypes _ctypes/_ctypes.c _ctypes/callbacks.c _ctypes/callproc.c _ctypes/stgdict.c _ctypes/cfield.c
195+
196196
else
197197
cat > Modules/Setup.local <<END
198+
*static*
199+
_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
200+
198201
*disabled*
199202
_decimal
200203
xxsubtype
201204
_crypt
202205
203-
*static*
204-
_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
205-
206206
END
207207
fi
208208

209+
sed -i 's| -lcrypto||g' Makefile
210+
209211
if emmake make -j$NPROC WASM_ASSETS_DIR=$(realpath ${PYTHONPYCACHEPREFIX}/empty)@/
210212
then
211-
emmake make WASM_ASSETS_DIR=$(realpath ${PYTHONPYCACHEPREFIX}/empty)@/ install
213+
if emmake make WASM_ASSETS_DIR=$(realpath ${PYTHONPYCACHEPREFIX}/empty)@/ install
214+
then
215+
echo ok
216+
else
217+
exit 1
218+
fi
212219
else
213-
echo " **** cpython wasm build failed ***
220+
emmake make -j1 Modules/_ctypes/_ctypes.o
221+
if emmake make WASM_ASSETS_DIR=$(realpath ${PYTHONPYCACHEPREFIX}/empty)@/ install
222+
then
223+
echo ok
224+
else
225+
echo " **** cpython wasm build failed ***
214226
215-
emmake make WASM_ASSETS_DIR=$(realpath ${PYTHONPYCACHEPREFIX}/empty)@/ install
227+
emmake make WASM_ASSETS_DIR=$(realpath ${PYTHONPYCACHEPREFIX}/empty)@/
216228
217229
" 1>&2
218230

219-
exit 1
231+
exit 1
232+
fi
220233
fi
221234

235+
222236
rm -rf $(find $ROOT/devices/ -type d|grep /__pycache__$)
223237

224238
popd

scripts/cpython-build-host-deps.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ echo "
77
" 1>&2
88

99

10-
# install critical packages.
10+
# install and update critical packages.
11+
$PIP install --upgrade pip
1112

1213

1314
# 3.12 and git deprecated setuptools bundling.

0 commit comments

Comments
 (0)