166
166
# --with-libs='-lz -lffi' \
167
167
168
168
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 \
170
170
emconfigure $ROOT /src/cpython${PYBUILD} /configure -C --with-emscripten-target=browser \
171
171
--cache-file=${PYTHONPYCACHEPREFIX} /config.cache \
172
172
--enable-wasm-dynamic-linking $TESTSUITE \
@@ -192,33 +192,47 @@ curses
192
192
*static*
193
193
zlib zlibmodule.c
194
194
END
195
- # _ctypes _ctypes/_ctypes.c _ctypes/callbacks.c _ctypes/callproc.c _ctypes/stgdict.c _ctypes/cfield.c
195
+
196
196
else
197
197
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
+
198
201
*disabled*
199
202
_decimal
200
203
xxsubtype
201
204
_crypt
202
205
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
-
206
206
END
207
207
fi
208
208
209
+ sed -i ' s| -lcrypto||g' Makefile
210
+
209
211
if emmake make -j$NPROC WASM_ASSETS_DIR=$( realpath ${PYTHONPYCACHEPREFIX} /empty) @/
210
212
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
212
219
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 ***
214
226
215
- emmake make WASM_ASSETS_DIR=$( realpath ${PYTHONPYCACHEPREFIX} /empty) @/ install
227
+ emmake make WASM_ASSETS_DIR=$( realpath ${PYTHONPYCACHEPREFIX} /empty) @/
216
228
217
229
" 1>&2
218
230
219
- exit 1
231
+ exit 1
232
+ fi
220
233
fi
221
234
235
+
222
236
rm -rf $( find $ROOT /devices/ -type d| grep /__pycache__$)
223
237
224
238
popd
0 commit comments