Skip to content

Commit e415ef5

Browse files
committed
fix mimalloc headers missing for 3.13
1 parent 36daddd commit e415ef5

File tree

4 files changed

+48
-11
lines changed

4 files changed

+48
-11
lines changed

python-wasi-sdk.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ fi
4242

4343
if [ -d ${SDKROOT} ]
4444
then
45-
echo "assming destination $SDKROOT is ready"
45+
echo "Assuming destination $SDKROOT is ready"
4646
else
4747
sudo mkdir -p ${SDKROOT}
4848
sudo chmod 777 ${SDKROOT}

python-wasm-sdk.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ fi
4242

4343
if [ -d ${SDKROOT} ]
4444
then
45-
echo "assming destination $SDKROOT is ready"
45+
echo "Assuming destination $SDKROOT is ready"
4646
else
4747
sudo mkdir -p ${SDKROOT}
4848
sudo chmod 777 ${SDKROOT}

scripts/cpython-build-emsdk-prebuilt.sh

Lines changed: 43 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,49 @@ PIP="${SDKROOT}/python3-wasm -m pip"
99

1010
# all needed for PEP722/723, hpy, cffi modules and wheel building
1111

12+
if echo $PYBUILD|grep -q 3.13$
13+
then
14+
# cython get the latest release on gh install on both host python and build python
15+
pushd build
16+
wget -q -c https://github.com/cython/cython/releases/download/${CYTHON_REL}/${CYTHON_WHL}
17+
$HPIP install --upgrade $CYTHON_WHL
18+
popd
19+
else
20+
echo "
21+
22+
23+
24+
25+
26+
27+
28+
29+
30+
31+
32+
33+
USING CYTHON GIT
34+
35+
36+
37+
38+
39+
40+
41+
42+
43+
44+
45+
46+
47+
"
48+
$HPIP install --upgrade git+https://github.com/cython/cython
49+
fi
50+
51+
52+
$PIP install build/$CYTHON_WHL
53+
54+
1255
for module in typing_extensions mypy_extensions pyproject-metadata \
1356
setuptools build wheel pyparsing packaging hatchling setuptools_scm \
1457
git+https://github.com/python-cffi/cffi meson-python git+https://github.com/pypa/installer
@@ -31,13 +74,6 @@ echo "
3174
" 1>&2
3275

3376

34-
# cython get the latest release on gh install on both host python and build python
35-
pushd build
36-
wget -q -c https://github.com/cython/cython/releases/download/${CYTHON_REL}/${CYTHON_WHL}
37-
$HPIP install --upgrade $CYTHON_WHL
38-
popd
39-
40-
$PIP install build/$CYTHON_WHL
4177

4278
# some we want to be certain to have in all minimal rootfs
4379
mkdir -p prebuilt/emsdk/common/site-packages/

scripts/cpython-build-emsdk.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,8 @@ END
231231
then
232232
if emmake make WASM_ASSETS_DIR=$(realpath ${PYTHONPYCACHEPREFIX}/empty)@/ install
233233
then
234-
echo ok
234+
echo "Fixing missing mimalloc for Free Threading 3.13+"
235+
cp -rf $ROOT/src/cpython${PYBUILD}/Include/internal/mimalloc/mimalloc ${PREFIX}/include/python${PYBUILD}/internal/
235236
else
236237
exit 1
237238
fi
@@ -240,7 +241,7 @@ END
240241
emmake make -j1 Modules/_ctypes/_ctypes.o
241242
if emmake make WASM_ASSETS_DIR=$(realpath ${PYTHONPYCACHEPREFIX}/empty)@/ install
242243
then
243-
echo ok
244+
echo "ok"
244245
else
245246
echo "
246247

0 commit comments

Comments
 (0)