Fix Pyodide Emscripten platform tags#3191
Open
messense wants to merge 1 commit into
Open
Conversation
2 tasks
6eb63d5 to
c3f9510
Compare
Emit PEP 783 `pyemscripten_*` platform tags whenever maturin receives a Pyodide ABI/platform version, including the historical `PYODIDE_ABI_VERSION` path used for Python 3.13. This matches current Pyodide docs and avoids generating `pyodide_2025_0_wasm32`, which PyPI rejects.
c3f9510 to
da58093
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
This pull request updates maturin’s Emscripten/Pyodide platform-tag resolution to consistently emit PEP 783 pyemscripten_*_wasm32 tags whenever a Pyodide ABI/platform version is provided (including the historical PYODIDE_ABI_VERSION path). It also adjusts the Emscripten runtime smoke test to remain compatible with older Pyodide runtimes that still validate legacy pyodide_*_wasm32 wheel filenames.
Changes:
- Update Emscripten platform-tag cascade to always produce
pyemscripten_{year}_{patch}_wasm32for both PEP 783 and historical Pyodide ABI inputs. - Adjust CI/nox/docs to reflect the new behavior and environment-variable expectations.
- Add a runtime-test compatibility copy/rename for Pyodide 0.28/0.29 wheel filename validation.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/emscripten_runner.js | Adds runtime-aware wheel path selection and legacy filename compatibility for older Pyodide runtimes. |
| src/target/platform_tag.rs | Changes tag cascade to always emit PEP 783 pyemscripten_* tags for Pyodide ABI/platform version inputs; updates/extends unit tests. |
| src/ci/github/render.rs | Updates generated GitHub Actions Emscripten setup to export PEP 783 platform version when available, else fall back to historical key. |
| noxfile.py | Aligns expected wheel tag and exported env vars with always-pyemscripten_* behavior. |
| guide/src/environment-variables.md | Updates documentation to describe historical PYODIDE_ABI_VERSION mapping to PEP 783 pyemscripten_* tags. |
| .github/workflows/test.yml | Updates CI comments to reflect the intended pyemscripten_* tags for current Pyodide versions. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+1
to
4
| const { copyFile, mkdtemp, opendir } = require("node:fs/promises"); | ||
| const { tmpdir } = require("node:os"); | ||
| const { join } = require("node:path"); | ||
| const { loadPyodide } = require("pyodide"); |
| This wheel will not be installable on PEP 783-compliant Pyodide runtimes. \ | ||
| Set `MATURIN_PYEMSCRIPTEN_PLATFORM_VERSION` (PEP 783) or \ | ||
| `MATURIN_PYODIDE_ABI_VERSION` (Pyodide 0.28+) to produce a portable tag." | ||
| `MATURIN_PYODIDE_ABI_VERSION` (legacy Pyodide config key) to produce a portable tag." |
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.
Emit PEP 783
pyemscripten_*platform tags whenever maturin receives a Pyodide ABI/platform version, including the historicalPYODIDE_ABI_VERSIONpath used for Python 3.13. This matches current Pyodide docs and avoids generatingpyodide_2025_0_wasm32, which PyPI rejects.