Support PEP 783 pyemscripten_*_wasm32 wheel platform tag#3163
Draft
Support PEP 783 pyemscripten_*_wasm32 wheel platform tag#3163
pyemscripten_*_wasm32 wheel platform tag#3163Conversation
The Emscripten platform-tag branch in `get_platform_tag` now resolves the wheel tag through a priority cascade so maturin produces installable wheels across the full Pyodide release spectrum: 1. `pyemscripten_<year>_<patch>_wasm32` (PEP 783, Pyodide >= 0.30 / Python 3.14+), driven by `MATURIN_PYEMSCRIPTEN_PLATFORM_VERSION` / `PYEMSCRIPTEN_PLATFORM_VERSION` or `pyodide config get pyemscripten_platform_version`. 2. `pyodide_<year>_<patch>_wasm32` (Pyodide 0.28 / 0.29), driven by `MATURIN_PYODIDE_ABI_VERSION` / `PYODIDE_ABI_VERSION` or `pyodide config get pyodide_abi_version`. 3. Legacy `emscripten_<emcc-version>_wasm32` (Pyodide <= 0.27), still driven by `MATURIN_EMSCRIPTEN_VERSION` / `emcc -dumpversion`. A warning notes that wheels in this format are not installable on PEP 783-compliant runtimes. The cascade is implemented as a pure function over an `EmscriptenVersionInputs` struct so the per-Pyodide-version behaviour can be covered deterministically by unit tests, and version segments are validated against the PEP 783 `[0-9]+_[0-9]+` regex so malformed inputs fail loudly instead of producing a tag that no installer accepts. The generated GitHub Actions workflow (`generate-ci`) now also exports `PYEMSCRIPTEN_PLATFORM_VERSION` and `PYODIDE_ABI_VERSION` from `pyodide config get`, defaulting to empty so older Pyodide releases keep producing the legacy tag. For real-Pyodide coverage, `noxfile.py` learns to parse `pyodide-lock.json` (`info.platform`, `info.abi_version`, and a future `info.pyemscripten_platform_version`) into the matching env vars plus an `EXPECTED_PLATFORM_TAG` that `test-emscripten` asserts against the produced wheel filename. The CI `test-emscripten` job is now a matrix over Pyodide 0.28 and 0.29, and `tests/emscripten_runner.js` was updated to match all three Emscripten tag families when locating the built wheel.
094bce9 to
b892cad
Compare
7 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The Emscripten platform-tag branch in
get_platform_tagnow resolves the wheel tag through a priority cascade so maturin produces installable wheels across the full Pyodide release spectrum:pyemscripten_<year>_<patch>_wasm32(PEP 783, Pyodide >= 0.30 / Python 3.14+), driven byMATURIN_PYEMSCRIPTEN_PLATFORM_VERSION/PYEMSCRIPTEN_PLATFORM_VERSIONorpyodide config get pyemscripten_platform_version.pyodide_<year>_<patch>_wasm32(Pyodide 0.28 / 0.29), driven byMATURIN_PYODIDE_ABI_VERSION/PYODIDE_ABI_VERSIONorpyodide config get pyodide_abi_version.emscripten_<emcc-version>_wasm32(Pyodide <= 0.27), still driven byMATURIN_EMSCRIPTEN_VERSION/emcc -dumpversion. A warning notes that wheels in this format are not installable on PEP 783-compliant runtimes.The cascade is implemented as a pure function over an
EmscriptenVersionInputsstruct so the per-Pyodide-version behaviour can be covered deterministically by unit tests, and version segments are validated against the PEP 783[0-9]+_[0-9]+regex so malformed inputs fail loudly instead of producing a tag that no installer accepts.The generated GitHub Actions workflow (
generate-ci) now also exportsPYEMSCRIPTEN_PLATFORM_VERSIONandPYODIDE_ABI_VERSIONfrompyodide config get, defaulting to empty so older Pyodide releases keep producing the legacy tag.For real-Pyodide coverage,
noxfile.pylearns to parsepyodide-lock.json(info.platform,info.abi_version, and a futureinfo.pyemscripten_platform_version) into the matching env vars plus anEXPECTED_PLATFORM_TAGthattest-emscriptenasserts against the produced wheel filename. The CItest-emscriptenjob is now a matrix over Pyodide 0.28 and 0.29, andtests/emscripten_runner.jswas updated to match all three Emscripten tag families when locating the built wheel.