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*
193193zlib zlibmodule.c
194194END
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
200203xxsubtype
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-
206206END
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
0 commit comments