Skip to content

Commit 526b953

Browse files
committed
build_pyodide.sh - allow executing multiple times
1 parent fb1c9eb commit 526b953

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

pyodide/build_pyodide.sh

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
#!/usr/bin/bash
22
set -ex
33

4+
# Script is assuming that it will be possible to execute it multiple times
5+
# therefore we're clearing venv each time and ignoring existing 'emsdk' folder.
6+
47
# Install uv.
58
curl -LsSf https://astral.sh/uv/install.sh | sh
6-
uv venv --python 3.13
9+
uv venv --python 3.13 --clear
710
source .venv/bin/activate
811

912
# Install pyodide cross build environment.
@@ -13,7 +16,9 @@ uv pip install pyodide-build
1316
uv run pyodide xbuildenv install
1417

1518
# Emscripten doesn't come with xbuildenv.
16-
git clone https://github.com/emscripten-core/emsdk
19+
if [ ! -d emsdk ]; then
20+
git clone https://github.com/emscripten-core/emsdk
21+
fi
1722
pushd emsdk
1823
PYODIDE_EMSCRIPTEN_VERSION=$(pyodide config get emscripten_version)
1924
./emsdk install ${PYODIDE_EMSCRIPTEN_VERSION}

0 commit comments

Comments
 (0)