Original file line numberDiff line numberDiff line change@@ -11,12 +11,6 @@ LABEL org.opencontainers.image.documentation="https://github.com/python/cpython-
11111212ARG TARGETARCH
131314-# WASI SDK versions are controlled in install-wasi.sh.
15-ENV WASI_SDK_ROOT=/opt
16-17-ENV WASMTIME_VERSION=38.0.2
18-ENV WASMTIME_HOME=/opt/wasmtime
19-2014RUN mkdir -p /opt/cpython-devcontainer/bin
2115COPY --chmod=755 install-wasi.sh /opt/cpython-devcontainer/bin/
2216Original file line numberDiff line numberDiff line change@@ -1,5 +1,14 @@
11#! /bin/bash -ex
223+WASI_SDK_VERSIONS=(
4+# 16 for 3.11 & 3.12 is special-cased below.
5+ 24 # 3.13 (w/ special symlinking below), 3.14
6+ 29 # 3.15
7+)
8+WASMTIME_VERSION="38.0.4"
9+10+WASI_SDK_ROOT=/opt
11+312mkdir --parents ${WASI_SDK_ROOT}
413514# For 3.11, 3.12.
@@ -15,10 +24,6 @@ case "${TARGETARCH}" in
1524*) echo"Unsupported TARGETARCH: ${TARGETARCH}"&&exit 1 ;;
1625esac&& \
172618-WASI_SDK_VERSIONS=(
19- 24 # 3.13, 3.14
20- 29 # 3.15
21-)
2227forVERSIONin"${WASI_SDK_VERSIONS[@]}";do
2328# The URL format only works for WASI SDK >= 23.
2429 URL=https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-${VERSION}/wasi-sdk-${VERSION}.0-${WASI_ARCH}-linux.tar.gz
@@ -28,6 +33,7 @@ done
2833# For Python 3.13 as Tools/wasm/wasi.py expects /opt/wasi-sdk by default.
2934ln -s ${WASI_SDK_ROOT}/wasi-sdk-24.0*/ /opt/wasi-sdk
303536+WASMTIME_HOME="/opt/wasmtime"
31373238mkdir --parents ${WASMTIME_HOME}
3339