From 25ff18d6a323f9ee1cbd4b14e4c52a68edac24c0 Mon Sep 17 00:00:00 2001 From: Brett Cannon Date: Fri, 19 Sep 2025 09:08:00 +0100 Subject: [PATCH] Remove WASI from the dev container It will be moved to a dedicated WASI container. --- .github/workflows/ci.yml | 11 +++++------ devcontainer/Dockerfile | 15 ++------------- devcontainer/README.md | 5 +++++ devcontainer/install-wasi.sh | 34 ---------------------------------- 4 files changed, 12 insertions(+), 53 deletions(-) create mode 100644 devcontainer/README.md delete mode 100644 devcontainer/install-wasi.sh diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3cf7794..e3eb85c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,14 +8,15 @@ on: branches: [main] jobs: - build_devcontainer: - name: Build and test (Devcontainer) + build_dev_container: + name: Build and test (Dev container) strategy: fail-fast: false matrix: os: [ubuntu-latest, ubuntu-24.04-arm] runs-on: ${{ matrix.os }} env: + # Dummy tag; version does not matter. TAG: cpython-devcontainer:1.0.0-${{ github.run_id }} steps: - name: Checkout Push to Registry action @@ -28,10 +29,8 @@ jobs: context: ./devcontainer load: true tags: ${{ env.TAG }} - - name: Test WASI SDK - run: docker run --rm ${{ env.TAG }} /opt/wasi-sdk/bin/clang --version - - name: Test Wasmtime - run: docker run --rm ${{ env.TAG }} wasmtime --version + - name: Test clang + run: docker run --rm ${{ env.TAG }} clang --version build_autoconf: name: Build and test (Autoconf) diff --git a/devcontainer/Dockerfile b/devcontainer/Dockerfile index d4c439c..1ffd4be 100644 --- a/devcontainer/Dockerfile +++ b/devcontainer/Dockerfile @@ -3,26 +3,15 @@ FROM docker.io/library/fedora:41 LABEL org.opencontainers.image.base.name="docker.io/library/fedora:41" LABEL org.opencontainers.image.source="https://github.com/python/cpython-devcontainers" LABEL org.opencontainers.image.title="CPython development container" -LABEL org.opencontainers.image.description="CPython development container with the tooling to work on Linux or WASI builds." +LABEL org.opencontainers.image.description="CPython development container with the tooling to work on Linux builds." LABEL org.opencontainers.image.authors="Brett Cannon" -ARG TARGETARCH - ENV CC=clang # Remove a video codec repository to speed up installs. RUN dnf config-manager setopt fedora-cisco-openh264.enabled=False -# Update only after consulting with WASI support maintainers (see PEP 11). -ENV WASI_SDK_VERSION=24 - -# Update as desired. -ENV WASMTIME_VERSION=35.0.0 -ENV WASMTIME_HOME=/opt/wasmtime - - RUN mkdir -p /opt/cpython-devcontainer/bin -COPY --chmod=755 install-builddeps.sh install-wasi.sh /opt/cpython-devcontainer/bin/ +COPY --chmod=755 install-builddeps.sh /opt/cpython-devcontainer/bin/ RUN /opt/cpython-devcontainer/bin/install-builddeps.sh -RUN /opt/cpython-devcontainer/bin/install-wasi.sh diff --git a/devcontainer/README.md b/devcontainer/README.md new file mode 100644 index 0000000..e4e7d2e --- /dev/null +++ b/devcontainer/README.md @@ -0,0 +1,5 @@ +A container for developing CPython for Linux. + +Various common utilities are included to make getting started easier. +See https://devguide.python.org/getting-started/setup-building/#using-a-container +for instructions on ways to use this container. diff --git a/devcontainer/install-wasi.sh b/devcontainer/install-wasi.sh deleted file mode 100644 index 3f9a5e1..0000000 --- a/devcontainer/install-wasi.sh +++ /dev/null @@ -1,34 +0,0 @@ -#! /bin/bash -ex - -# Install the WASI SDK. -# This should be portable to any Linux, but is only tested in the devcontainer. - -case "${TARGETARCH}" in - amd64) WASI_ARCH="x86_64" ;; - arm64) WASI_ARCH="arm64" ;; - *) echo "Unsupported TARGETARCH: ${TARGETARCH}" && exit 1 ;; -esac && \ - -URL=https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-${WASI_SDK_VERSION}/wasi-sdk-${WASI_SDK_VERSION}.0-${WASI_ARCH}-linux.tar.gz - -curl --location $URL | tar --directory /opt --extract --gunzip - -# For Python 3.13 as Tools/wasm/wasi.py expects /opt/wasi-sdk. -ln -s /opt/wasi-sdk-${WASI_SDK_VERSION}.0*/ /opt/wasi-sdk - - -mkdir --parents ${WASMTIME_HOME} - -case "${TARGETARCH}" in - amd64) WASMTIME_ARCH="x86_64" ;; - arm64) WASMTIME_ARCH="aarch64" ;; - *) echo "Unsupported TARGETARCH: ${TARGETARCH}" && exit 1 ;; -esac - -URL="https://github.com/bytecodealliance/wasmtime/releases/download/v${WASMTIME_VERSION}/wasmtime-v${WASMTIME_VERSION}-${WASMTIME_ARCH}-linux.tar.xz" - -curl --location $URL | - xz --decompress | - tar --strip-components 1 --directory ${WASMTIME_HOME} -x - -ln -s ${WASMTIME_HOME}/wasmtime /usr/local/bin