diff --git a/pyodide/build_pyodide.sh b/pyodide/build_pyodide.sh index db5c5f08b0..205ee5395f 100755 --- a/pyodide/build_pyodide.sh +++ b/pyodide/build_pyodide.sh @@ -1,6 +1,9 @@ #!/usr/bin/bash set -ex +PYODIDE_VERSION=0.29.3 +PYODIDE_BUILD_VERSION=0.33.0 + # Script is assuming that it will be possible to execute it multiple times # therefore we're clearing venv each time and ignoring existing 'emsdk' folder. @@ -11,13 +14,14 @@ source .venv/bin/activate # Install pyodide cross build environment. # Instructions: https://pyodide.org/en/stable/development/building-packages.html -uv pip install pyodide-build +uv pip install "pyodide-build==${PYODIDE_BUILD_VERSION}" # `uv run` is required, so xbuildenv would skip using `pip`. -uv run pyodide xbuildenv install +uv run pyodide xbuildenv install "${PYODIDE_VERSION}" uv run pyodide xbuildenv install-emscripten EMSDK_ROOT=$(pyodide config get emscripten_dir) -source ${EMSDK_ROOT}/emsdk_env.sh +[ -f "${EMSDK_ROOT}/emsdk_env.sh" ] && source "${EMSDK_ROOT}/emsdk_env.sh" +[ -f "${EMSDK_ROOT}/../../emsdk_env.sh" ] && source "${EMSDK_ROOT}/../../emsdk_env.sh" which emcc mkdir -p packages/ifcopenshell