diff --git a/recipes/recipes_emscripten/python/build.sh b/recipes/recipes_emscripten/python/build.sh index f65278cc9..dc8b71eb6 100644 --- a/recipes/recipes_emscripten/python/build.sh +++ b/recipes/recipes_emscripten/python/build.sh @@ -1,5 +1,7 @@ #!/bin/bash +export PYTHON_TOP_VERSION=3.12 + set -euxo pipefail mkdir -p $PREFIX/include @@ -10,7 +12,7 @@ mkdir -p $PREFIX/etc/conda # Move all python package files to the build folder export BUILD=build/${PKG_VERSION}/Python-${PKG_VERSION} mkdir -p ${BUILD} -mv Makefile.pre.in README.rst aclocal.m4 config.guess config.sub setup.py pyconfig.h.in install-sh configure.ac ${BUILD} +mv Makefile.pre.in README.rst aclocal.m4 config.guess config.sub pyconfig.h.in install-sh configure.ac ${BUILD} mv Doc Grammar Include LICENSE Lib Mac Misc Modules Objects PC PCbuild Parser Programs Python Tools configure ${BUILD} # copy the LICENSE file back for the recipe @@ -20,7 +22,7 @@ cp ${BUILD}/LICENSE . # since the python build script overwrites the env variable PYTHON to python.js # as it assumes this is the correct name for the python binary when building for emscripten. # But emscripten itself (emcc/emar/...) relies on the env variable PYTHON to be set to python3.11 -ln -s $BUILD_PREFIX/bin/python3.11 $BUILD_PREFIX/bin/python.js +ln -s $BUILD_PREFIX/bin/python${PYTHON_TOP_VERSION} $BUILD_PREFIX/bin/python.js # create an empty emsdk_env.sh in CONDA_EMSDK_DIR echo "" > $EMSCRIPTEN_FORGE_EMSDK_DIR/emsdk_env.sh @@ -54,14 +56,14 @@ echo "echo \"pip is not a supported on this platform.\"" >> $PREFIX/bin/pip chmod +x $PREFIX/bin/pip # a fake python3 command -touch $PREFIX/bin/python3.11 -echo "#!/bin/bash" >> $PREFIX/bin/python3.11 -echo "echo \"python3 is not a supported on this platform.\"" >> $PREFIX/bin/python3.11 -chmod +x $PREFIX/bin/python3.11 +touch $PREFIX/bin/python${PYTHON_TOP_VERSION} +echo "#!/bin/bash" >> $PREFIX/bin/python${PYTHON_TOP_VERSION} +echo "echo \"python3 is not a supported on this platform.\"" >> $PREFIX/bin/python${PYTHON_TOP_VERSION} +chmod +x $PREFIX/bin/python${PYTHON_TOP_VERSION} # create symlink st. all possible python3.11 commands are available -ln -s $PREFIX/bin/python3.11 $PREFIX/bin/python -ln -s $PREFIX/bin/python3.11 $PREFIX/bin/python3 +ln -s $PREFIX/bin/python${PYTHON_TOP_VERSION} $PREFIX/bin/python +ln -s $PREFIX/bin/python${PYTHON_TOP_VERSION} $PREFIX/bin/python3 # copy sysconfigdata -cp $PREFIX/sysconfigdata/_sysconfigdata__emscripten_wasm32-emscripten.py $PREFIX/etc/conda/ \ No newline at end of file +cp $PREFIX/sysconfigdata/_sysconfigdata__emscripten_wasm32-emscripten.py $PREFIX/etc/conda/