feat: Pyodide 0.28 release (#2487)
* Bump testing version to 0.28.0 * Bump Pyodide constraints * Add Pyodide 0.28.0 identifier * Override to a different, alpha version for testing * Update docs for Pyodide versions everywhere * Add comment on using older Pyodide alpha version * Bump to `"cp313*"` for compatibility * Drop identifier for Pyodide 0.28.0a3 * Add back Pyodide 0.28.0a3 identifier * Add helpful comment about pyodide-prerelease option * Fix test and add a comment about it * Keep one Pyodide version per Python version * Fix docs for `pyodide-prerelease`; Python ➡️ Pyodide * Update utils.py * Drop CI test step for overridden Pyodide version Suggested-by: Joe Rickerby <joerick@mac.com> --------- Co-authored-by: Henry Schreiner <HenrySchreinerIII@gmail.com>
This commit is contained in:
co-authored by
Henry Schreiner
parent
5e245905b3
commit
cd9b48cb74
@@ -233,19 +233,6 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
CIBW_PLATFORM: pyodide
|
CIBW_PLATFORM: pyodide
|
||||||
|
|
||||||
- name: Run a sample build (GitHub Action) for an overridden Pyodide version
|
|
||||||
uses: ./
|
|
||||||
with:
|
|
||||||
package-dir: sample_proj
|
|
||||||
output-dir: wheelhouse
|
|
||||||
# In case this breaks at any point in time, switch to using the latest version
|
|
||||||
# available or any other version that is not the same as the default one set
|
|
||||||
# in cibuildwheel/resources/build-platforms.toml.
|
|
||||||
env:
|
|
||||||
CIBW_PLATFORM: pyodide
|
|
||||||
CIBW_BUILD: "cp312*"
|
|
||||||
CIBW_PYODIDE_VERSION: "0.27.6"
|
|
||||||
|
|
||||||
- name: Run tests with 'CIBW_PLATFORM' set to 'pyodide'
|
- name: Run tests with 'CIBW_PLATFORM' set to 'pyodide'
|
||||||
run: |
|
run: |
|
||||||
uv run --no-sync ./bin/run_tests.py
|
uv run --no-sync ./bin/run_tests.py
|
||||||
|
|||||||
@@ -99,10 +99,17 @@ class BuildSelector:
|
|||||||
return False
|
return False
|
||||||
if EnableGroup.GraalPy not in self.enable and fnmatch(build_id, "gp*"):
|
if EnableGroup.GraalPy not in self.enable and fnmatch(build_id, "gp*"):
|
||||||
return False
|
return False
|
||||||
if EnableGroup.PyodidePrerelease not in self.enable and fnmatch(
|
# TODO: Re-enable this when we have Pyodide prereleases again (e.g., 0.29.0a1+)
|
||||||
build_id, "cp313-pyodide_*"
|
# Python 3.13 support became stable in Pyodide 0.28.0, so it no longer needs a prerelease
|
||||||
):
|
# flag.
|
||||||
return False
|
# Also update Pyodide tests in unit_test/build_selector_test.py accordingly.
|
||||||
|
# When re-enabling, update the pattern to match the experimental Python version in case
|
||||||
|
# it is bumped to Python 3.14 (likely cp314-pyodide_* but could remain as 3.13 as well).
|
||||||
|
# This depends on the CPython version being used in the Pyodide runtime at the time.
|
||||||
|
# if EnableGroup.PyodidePrerelease not in self.enable and fnmatch(
|
||||||
|
# build_id, "cp313-pyodide_*"
|
||||||
|
# ):
|
||||||
|
# return False
|
||||||
|
|
||||||
should_build = selector_matches(self.build_config, build_id)
|
should_build = selector_matches(self.build_config, build_id)
|
||||||
should_skip = selector_matches(self.skip_config, build_id)
|
should_skip = selector_matches(self.skip_config, build_id)
|
||||||
|
|||||||
+8
-8
@@ -1288,22 +1288,22 @@ The available Pyodide versions are determined by the version of `pyodide-build`
|
|||||||
|
|
||||||
```toml
|
```toml
|
||||||
[tool.cibuildwheel.pyodide]
|
[tool.cibuildwheel.pyodide]
|
||||||
# Build Pyodide wheels using Pyodide version 0.27.6
|
# Build Pyodide wheels using Pyodide version 0.28.0
|
||||||
pyodide-version = "0.27.6"
|
pyodide-version = "0.28.0"
|
||||||
|
|
||||||
[tool.cibuildwheel.pyodide]
|
[tool.cibuildwheel.pyodide]
|
||||||
# Build Pyodide wheels using a specific alpha release
|
# Build Pyodide wheels using a specific, previously released alpha release of 0.28.0
|
||||||
pyodide-version = "0.28.0a2"
|
pyodide-version = "0.28.0a3"
|
||||||
```
|
```
|
||||||
|
|
||||||
!!! tab examples "Environment variables"
|
!!! tab examples "Environment variables"
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
# Build Pyodide wheels using Pyodide version 0.27.6
|
# Build Pyodide wheels using Pyodide version 0.28.0
|
||||||
CIBW_PYODIDE_VERSION: 0.27.6
|
CIBW_PYODIDE_VERSION: 0.28.0
|
||||||
|
|
||||||
# Build Pyodide wheels using a specific alpha release
|
# Build Pyodide wheels using a specific, previously released alpha release of 0.28.0
|
||||||
CIBW_PYODIDE_VERSION: 0.28.0a2
|
CIBW_PYODIDE_VERSION: 0.28.0a3
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -172,7 +172,7 @@ You must target pyodide with `--platform pyodide` (or use `--only` on the identi
|
|||||||
|
|
||||||
It is also possible to target a specific Pyodide version by setting the [`pyodide-version`](options.md#pyodide-version) option to the desired version. Users are responsible for setting an appropriate Pyodide version according to the `pyodide-build` version. A list is available in Pyodide's [cross-build environments metadata file](https://github.com/pyodide/pyodide/blob/main/pyodide-cross-build-environments.json), which can be viewed more easily by installing `pyodide-build` from PyPI and using `pyodide xbuildenv search --all` to see a compatibility table.
|
It is also possible to target a specific Pyodide version by setting the [`pyodide-version`](options.md#pyodide-version) option to the desired version. Users are responsible for setting an appropriate Pyodide version according to the `pyodide-build` version. A list is available in Pyodide's [cross-build environments metadata file](https://github.com/pyodide/pyodide/blob/main/pyodide-cross-build-environments.json), which can be viewed more easily by installing `pyodide-build` from PyPI and using `pyodide xbuildenv search --all` to see a compatibility table.
|
||||||
|
|
||||||
If there are pre-releases available for a newer Python version, the `pyodide-prerelease` [`enable`](options.md#enable) can be used to include pre-release versions.
|
If there are pre-releases available for a newer Pyodide version, the `pyodide-prerelease` [`enable`](options.md#enable) can be used to include pre-release versions.
|
||||||
|
|
||||||
### Running tests
|
### Running tests
|
||||||
|
|
||||||
|
|||||||
+1
-3
@@ -261,9 +261,7 @@ def _expected_wheels(
|
|||||||
musllinux_versions = ["musllinux_1_2"]
|
musllinux_versions = ["musllinux_1_2"]
|
||||||
|
|
||||||
if platform == "pyodide" and python_abi_tags is None:
|
if platform == "pyodide" and python_abi_tags is None:
|
||||||
python_abi_tags = ["cp312-cp312"]
|
python_abi_tags = ["cp312-cp312", "cp313-cp313"]
|
||||||
if EnableGroup.PyodidePrerelease in enable_groups:
|
|
||||||
python_abi_tags.append("cp313-cp313")
|
|
||||||
elif platform == "ios" and python_abi_tags is None:
|
elif platform == "ios" and python_abi_tags is None:
|
||||||
python_abi_tags = ["cp313-cp313"]
|
python_abi_tags = ["cp313-cp313"]
|
||||||
elif python_abi_tags is None:
|
elif python_abi_tags is None:
|
||||||
|
|||||||
@@ -107,7 +107,7 @@ def test_build_filter_pyodide():
|
|||||||
enable=frozenset(),
|
enable=frozenset(),
|
||||||
)
|
)
|
||||||
assert build_selector("cp312-pyodide_wasm32")
|
assert build_selector("cp312-pyodide_wasm32")
|
||||||
assert not build_selector("cp313-pyodide_wasm32")
|
assert build_selector("cp313-pyodide_wasm32")
|
||||||
|
|
||||||
|
|
||||||
def test_skip():
|
def test_skip():
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ manylinux-x86_64-image = "manylinux_2_28"
|
|||||||
|
|
||||||
environment-pass = ["EXAMPLE_ENV"]
|
environment-pass = ["EXAMPLE_ENV"]
|
||||||
|
|
||||||
pyodide-version = "0.27.6"
|
pyodide-version = "0.28.0"
|
||||||
|
|
||||||
[tool.cibuildwheel.macos]
|
[tool.cibuildwheel.macos]
|
||||||
test-requires = "else"
|
test-requires = "else"
|
||||||
@@ -92,7 +92,7 @@ def test_options_1(tmp_path, monkeypatch):
|
|||||||
assert local.manylinux_images["x86_64"] == pinned_x86_64_container_image["manylinux_2_34"]
|
assert local.manylinux_images["x86_64"] == pinned_x86_64_container_image["manylinux_2_34"]
|
||||||
|
|
||||||
local = options.build_options("cp312-pyodide_wasm32")
|
local = options.build_options("cp312-pyodide_wasm32")
|
||||||
assert local.pyodide_version == "0.27.6"
|
assert local.pyodide_version == "0.28.0"
|
||||||
|
|
||||||
|
|
||||||
def test_passthrough(tmp_path, monkeypatch):
|
def test_passthrough(tmp_path, monkeypatch):
|
||||||
|
|||||||
Reference in New Issue
Block a user