[WIP]: Updates for Pyodide builds after pyodide-build
was unvendored
#2002
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.
Tip
This PR is currently a work in progress and is not yet ready for review. However, feedback is welcome. The text below is a stub and will be updated with code changes.
This PR updates the Pyodide build procedure (see #1456) that is enabled with
CIBW_PLATFORM: "pyodide"
(or with the--platform pyodide
CLI equivalent) post the changes in pyodide/pyodide#4882, wherepyodide/pyodide-build
was unvendored from the main Pyodide repository to accommodate faster updates and fixes.This means that the Pyodide version and
pyodide-build
are not going to be in sync going forward, and that the Pyodide xbuildenv to install must be inferred by the versions available to install bypyodide-build
through a recently addedpyodide xbuildenv search
command, which prints out this table:Tap to expand table
Alternatively, one may use
pyodide xbuildenv search --all
to return both compatible and non-compatible versions. This would, however, be better received as JSON (please see pyodide/pyodide-build#28).Additionally, in this PR, I would like to implement support for installing arbitrary Pyodide versions, or, more specifically, arbitrary Pyodide xbuildenv versions – though, only the ones that are supported for a given
pyodide-build
version. This could be done through an environment variablePYODIDE_XBUILDENV_VERSION
(or,PYODIDE_VERSION
because it's shorter) and an associated configuration variable in the schema. It would therefore be great to get the above table in machine-readable code to validate it insidecibuildwheel/pyodide.py
– for which I opened pyodide/pyodide-build#26 and I'm working on that right now. The rationale behind this is that WebAssembly/Pyodide builds are already experimental anyway, and it would be useful to not tie the available Pyodide version to thecibuildwheel
version – this would be helpful for downstream projects (statsmodels/statsmodels#9343, scikit-image/scikit-image#7525, scikit-learn/scikit-learn#29791, and so on) to allow testing against Pyodide alpha releases and/or for the case of reproducibility against Pyodide's older releases.cc: @hoodmane and @ryanking13 for visibility