Skip to content

Commit

Permalink
3.1.45pre
Browse files Browse the repository at this point in the history
  • Loading branch information
pmp-p committed Aug 23, 2023
1 parent 9881f68 commit 002166e
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 10 deletions.
32 changes: 23 additions & 9 deletions scripts/cpython-build-emsdk.sh
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ END
# --with-libs='-lz -lffi' \


CONFIG_SITE=$ROOT/src/cpython${PYBUILD}/Tools/wasm/config.site-wasm32-pydk \
PKG_CONFIG_PATH="${PREFIX}/lib/pkgconfig" CONFIG_SITE=$ROOT/src/cpython${PYBUILD}/Tools/wasm/config.site-wasm32-pydk \
emconfigure $ROOT/src/cpython${PYBUILD}/configure -C --with-emscripten-target=browser \
--cache-file=${PYTHONPYCACHEPREFIX}/config.cache \
--enable-wasm-dynamic-linking $TESTSUITE\
Expand All @@ -192,33 +192,47 @@ curses
*static*
zlib zlibmodule.c
END
# _ctypes _ctypes/_ctypes.c _ctypes/callbacks.c _ctypes/callproc.c _ctypes/stgdict.c _ctypes/cfield.c

else
cat > Modules/Setup.local <<END
*static*
_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
*disabled*
_decimal
xxsubtype
_crypt
*static*
_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
END
fi

sed -i 's| -lcrypto||g' Makefile

if emmake make -j$NPROC WASM_ASSETS_DIR=$(realpath ${PYTHONPYCACHEPREFIX}/empty)@/
then
emmake make WASM_ASSETS_DIR=$(realpath ${PYTHONPYCACHEPREFIX}/empty)@/ install
if emmake make WASM_ASSETS_DIR=$(realpath ${PYTHONPYCACHEPREFIX}/empty)@/ install
then
echo ok
else
exit 1
fi
else
echo " **** cpython wasm build failed ***
emmake make -j1 Modules/_ctypes/_ctypes.o
if emmake make WASM_ASSETS_DIR=$(realpath ${PYTHONPYCACHEPREFIX}/empty)@/ install
then
echo ok
else
echo " **** cpython wasm build failed ***
emmake make WASM_ASSETS_DIR=$(realpath ${PYTHONPYCACHEPREFIX}/empty)@/ install
emmake make WASM_ASSETS_DIR=$(realpath ${PYTHONPYCACHEPREFIX}/empty)@/
" 1>&2

exit 1
exit 1
fi
fi


rm -rf $(find $ROOT/devices/ -type d|grep /__pycache__$)

popd
Expand Down
3 changes: 2 additions & 1 deletion scripts/cpython-build-host-deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ echo "
" 1>&2


# install critical packages.
# install and update critical packages.
$PIP install --upgrade pip


# 3.12 and git deprecated setuptools bundling.
Expand Down

0 comments on commit 002166e

Please sign in to comment.