11#! /bin/bash
22
3- export PYMAJOR_VERSION =3.13
3+ PY_VERSION =3.13
44
55set -euxo pipefail
66
@@ -22,7 +22,7 @@ cp ${BUILD}/LICENSE .
2222# since the python build script overwrites the env variable PYTHON to python.js
2323# as it assumes this is the correct name for the python binary when building for emscripten.
2424# But emscripten itself (emcc/emar/...) relies on the env variable PYTHON to be set to python<version_major>.<version_minor>
25- ln -s $BUILD_PREFIX /bin/python${PYMAJOR_VERSION } $BUILD_PREFIX /bin/python.js
25+ ln -s $BUILD_PREFIX /bin/python${PY_VERSION } $BUILD_PREFIX /bin/python.js
2626
2727# create an empty emsdk_env.sh in CONDA_EMSDK_DIR
2828echo " " > $EMSCRIPTEN_FORGE_EMSDK_DIR /emsdk_env.sh
@@ -36,35 +36,36 @@ cp ${RECIPE_DIR}/Setup.local .
3636cp ${RECIPE_DIR} /adjust_sysconfig.py .
3737
3838# The actual build
39- make
39+ make
4040
4141# (TODO move in recipe) install libmpdec and libexpat
4242cp ${BUILD} /Modules/_decimal/libmpdec/libmpdec.a $PREFIX /lib
4343cp ${BUILD} /Modules/expat/libexpat.a $PREFIX /lib
4444
4545# a fake wheel command
4646touch $PREFIX /bin/wheel
47- # append #!/bin/bash
48-
4947echo " #!/bin/bash" >> $PREFIX /bin/wheel
50- echo " echo \" wheel is not a supported on this platform.\" " >> $PREFIX /bin/wheel
48+ echo " echo \" wheel is not supported on this platform.\" " >> $PREFIX /bin/wheel
49+ echo " exit 1" >> $PREFIX /bin/wheel
5150chmod +x $PREFIX /bin/wheel
5251
5352# a fake pip command
5453touch $PREFIX /bin/pip
5554echo " #!/bin/bash" >> $PREFIX /bin/pip
56- echo " echo \" pip is not a supported on this platform.\" " >> $PREFIX /bin/pip
55+ echo " echo \" pip is not supported on this platform.\" " >> $PREFIX /bin/pip
56+ echo " exit 1" >> $PREFIX /bin/pip
5757chmod +x $PREFIX /bin/pip
5858
59- # a fake python3 command
60- touch $PREFIX /bin/python${PYMAJOR_VERSION}
61- echo " #!/bin/bash" >> $PREFIX /bin/python${PYMAJOR_VERSION}
62- echo " echo \" python3 is not a supported on this platform.\" " >> $PREFIX /bin/python${PYMAJOR_VERSION}
63- chmod +x $PREFIX /bin/python${PYMAJOR_VERSION}
59+ # a fake python3.XY command
60+ touch $PREFIX /bin/python${PY_VERSION}
61+ echo " #!/bin/bash" >> $PREFIX /bin/python${PY_VERSION}
62+ echo " echo \" python3 is not supported on this platform.\" " >> $PREFIX /bin/python${PY_VERSION}
63+ echo " exit 1" >> $PREFIX /bin/python${PY_VERSION}
64+ chmod +x $PREFIX /bin/python${PY_VERSION}
6465
65- # create symlink st. all possible python3.11 commands are available
66- ln -s $PREFIX /bin/python${PYMAJOR_VERSION } $PREFIX /bin/python
67- ln -s $PREFIX /bin/python${PYMAJOR_VERSION } $PREFIX /bin/python3
66+ # create symlink st. all possible python3.XY commands are available
67+ ln -s $PREFIX /bin/python${PY_VERSION } $PREFIX /bin/python
68+ ln -s $PREFIX /bin/python${PY_VERSION } $PREFIX /bin/python3
6869
6970# copy sysconfigdata
7071cp $PREFIX /sysconfigdata/_sysconfigdata__emscripten_wasm32-emscripten.py $PREFIX /etc/conda/
0 commit comments