Skip to content

Commit ba0b060

Browse files
committed
Tag the Pyodide wheel per PEP 783 so PyPI accepts it
The original commit produced a wheel tagged `emscripten_3_1_58_wasm32`. PyPI's warehouse validator (live since 2026-04-21) only accepts `pyemscripten_<year>_<patch>_wasm32` per PEP 783, so that wheel would have been rejected at upload time. Local `emfs://` verification did not catch this because it bypasses index-side tag validation. Updates: - Bump Pyodide to 0.29.4, which natively installs `pyemscripten_*` wheels (pyodide/pyodide#6180, #6203) and ships Python 3.13 as its bundled interpreter. - Bump host Python on the runner to 3.13 to satisfy pyodide-build's xbuildenv compatibility check. - Pin maturin to >= 1.13.2, which introduced the PEP 783 tag cascade (PyO3/maturin#3163), and export `MATURIN_PYEMSCRIPTEN_PLATFORM_VERSION` derived from `pyodide config get` so the cascade emits the `pyemscripten_*` tag even on Pyodide 0.29 (where it would otherwise fall back to `pyodide_*`). - Verify step now asserts the wheel filename matches `pyemscripten_<year>_<patch>_wasm32.whl` before loading, so a PyPI-incompatible tag fails CI loudly instead of slipping through.
1 parent 05b014c commit ba0b060

1 file changed

Lines changed: 13 additions & 4 deletions

File tree

.github/workflows/CI.yml

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -131,15 +131,15 @@ jobs:
131131
pyodide:
132132
runs-on: ubuntu-latest
133133
env:
134-
PYODIDE_VERSION: "0.27.7"
134+
PYODIDE_VERSION: "0.29.4"
135135
RUSTUP_TOOLCHAIN: nightly-2025-08-08
136136
steps:
137137
- uses: actions/checkout@v4
138138
- uses: actions/setup-python@v5
139139
with:
140-
# Pyodide 0.27.x bundles Python 3.12, and pyodide-build's
140+
# Pyodide 0.29.x bundles Python 3.13, and pyodide-build's
141141
# xbuildenv install rejects mismatched host Python versions.
142-
python-version: "3.12"
142+
python-version: "3.13"
143143
- uses: actions/setup-node@v4
144144
with:
145145
node-version: "22"
@@ -168,7 +168,13 @@ jobs:
168168
export PYO3_BUILD_EXTENSION_MODULE=1
169169
export PYO3_PYTHON="$(pyodide config get interpreter)"
170170
export PYTHON_SYS_EXECUTABLE="$PYO3_PYTHON"
171-
uvx maturin build --release \
171+
# Force maturin to emit the PEP 783 `pyemscripten_<year>_<patch>_wasm32`
172+
# tag. PyPI's warehouse validator only accepts this format; the legacy
173+
# `pyodide_*` / `emscripten_*` tags get rejected at upload.
174+
plat_ver="$(pyodide config get pyemscripten_platform_version 2>/dev/null || true)"
175+
[[ -n "$plat_ver" ]] || plat_ver="$(pyodide config get pyodide_abi_version)"
176+
export MATURIN_PYEMSCRIPTEN_PLATFORM_VERSION="$plat_ver"
177+
uvx 'maturin>=1.13.2' build --release \
172178
--target wasm32-unknown-emscripten \
173179
-i "$PYO3_PYTHON" \
174180
--compatibility off \
@@ -178,6 +184,9 @@ jobs:
178184
set -euo pipefail
179185
wheel="$(find "$PWD/dist-pyodide" -maxdepth 1 -name '*.whl' | head -n1)"
180186
[[ -n "$wheel" ]] || { echo "no wheel built" >&2; exit 1; }
187+
# Guard against silently shipping a tag PyPI won't accept (PEP 783).
188+
[[ "$(basename "$wheel")" =~ pyemscripten_[0-9]+_[0-9]+_wasm32\.whl$ ]] \
189+
|| { echo "wheel '$wheel' is not PEP 783 tagged" >&2; exit 1; }
181190
cd "$RUNNER_TEMP"
182191
npm init -y >/dev/null
183192
npm install --silent "pyodide@${PYODIDE_VERSION}"

0 commit comments

Comments
 (0)