Skip to content
Merged
Show file tree
Hide file tree
Changes from 27 commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
87bcefe
Use `pyodide config get emscripten_dir`
agriyakhetarpal Apr 6, 2026
17679b8
Update constraints
agriyakhetarpal Apr 6, 2026
2df97d1
Updates for `pyemscripten` platform tag
agriyakhetarpal Apr 6, 2026
4bd785d
Weird constraints stuff...
agriyakhetarpal Apr 6, 2026
499e965
Revert "Weird constraints stuff..."
agriyakhetarpal Apr 6, 2026
8064a46
Add some special constraints for pyodide
agriyakhetarpal Apr 6, 2026
ac56575
Wheel pyemscripten collision
agriyakhetarpal Apr 6, 2026
52fa455
Put delocate back in constraints (not needed tho)
agriyakhetarpal Apr 6, 2026
46a2627
Drop Pyodide 0.27.7 (cp312-pyodide_wasm32)
agriyakhetarpal Apr 10, 2026
088d6e5
Add Pyodide 314.0.0a1 (cp314-pyodide_wasm32)
agriyakhetarpal Apr 10, 2026
455e568
Delete no-longer-needed Pyodide 312 constraints
agriyakhetarpal Apr 10, 2026
9396cae
Update Pyodide 313 and 314 constraints
agriyakhetarpal Apr 10, 2026
f0289d8
Add back prerelease stuff and update tests
agriyakhetarpal Apr 10, 2026
9749c11
Fix `test_pyodide_on_windows`
agriyakhetarpal Apr 10, 2026
e3c8ca1
Update and fix tests some more
agriyakhetarpal Apr 10, 2026
f4e5229
Also enable pyodide-prerelease in GHA sample build
agriyakhetarpal Apr 10, 2026
3fe3394
Update tests yet again (`SINGLE_PYTHON_VERSION` changes)
agriyakhetarpal Apr 10, 2026
6092434
Add a Pyodide-specific maintenance guide
agriyakhetarpal Apr 10, 2026
87c1be7
Merge branch 'main' into pyodide-updates
agriyakhetarpal Apr 10, 2026
40ffec0
Add suggestions from Hood and Gyeongjae
agriyakhetarpal Apr 13, 2026
18ea0fc
Merge main
agriyakhetarpal May 7, 2026
e50d138
Add "Last updated: May 2026" to Pyodide document
agriyakhetarpal May 7, 2026
829392f
Add a Pyodide EOL filter
agriyakhetarpal May 7, 2026
0a4abb6
Fix typo
agriyakhetarpal May 7, 2026
1960c6e
Update maintenance docs about EoL Pyodide
agriyakhetarpal May 7, 2026
44bdfbc
Add Pyodide 312 constraints back
agriyakhetarpal May 7, 2026
f4255af
Update Pyodide 313 and 314 constraints
agriyakhetarpal May 7, 2026
8fc1e7c
Remove "experimental" note about Pyodide
agriyakhetarpal May 8, 2026
ff16b28
Remove another experimental Pyodide sentence
agriyakhetarpal May 8, 2026
d408f03
Add docs about the `pyodide-eol` enable option
agriyakhetarpal May 8, 2026
11490ff
Merge upstream/main into pyodide-updates
henryiii May 9, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -321,11 +321,13 @@ jobs:
output-dir: wheelhouse
env:
CIBW_PLATFORM: pyodide
CIBW_ENABLE: pyodide-prerelease

- name: Run tests with 'CIBW_PLATFORM' set to 'pyodide'
run: uv run --no-sync ./bin/run_tests.py
env:
CIBW_PLATFORM: pyodide
CIBW_ENABLE: pyodide-prerelease

test-uv-extras:
name: Test uv extra on ${{ matrix.os }} ${{ matrix.test_select }}
Expand Down
21 changes: 10 additions & 11 deletions cibuildwheel/platforms/pyodide.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,29 +94,28 @@ def ensure_node(major_version: str) -> Path:
return path


def install_emscripten(
env: dict[str, str], version: str, xbuildenv_cache_path: Path, pyodide_version: str
) -> Path:
def install_emscripten(env: dict[str, str], version: str, xbuildenv_cache_path: Path) -> Path:
"""Install Emscripten via pyodide-build, which also applies Pyodide-specific patches."""
emcc_path = (
xbuildenv_cache_path / pyodide_version / "emsdk" / "upstream" / "emscripten" / "emcc"
emscripten_dir = Path(
call("pyodide", "config", "get", "emscripten_dir", env=env, capture_stdout=True).strip()
)
with FileLock(CIBW_CACHE_PATH / "emscripten.lock"):
if emcc_path.exists():
return emcc_path
if emscripten_dir.exists():
return emscripten_dir
call(
"pyodide",
"xbuildenv",
"install-emscripten",
"--force",
Comment thread
henryiii marked this conversation as resolved.
"--version",
version,
"--path",
str(xbuildenv_cache_path),
env=env,
cwd=CIBW_CACHE_PATH,
)
assert emcc_path.exists()
return emcc_path
assert emscripten_dir.exists()
return emscripten_dir


def get_all_xbuildenv_version_info(env: dict[str, str]) -> list[PyodideXBuildEnvInfo]:
Expand Down Expand Up @@ -315,9 +314,9 @@ def setup_python(
log.step(
f"Installing Emscripten {emscripten_version} and applying Pyodide-specific patches ..."
)
emcc_path = install_emscripten(env, emscripten_version, xbuildenv_cache_path, pyodide_version)
emscripten_dir = install_emscripten(env, emscripten_version, xbuildenv_cache_path)

env["PATH"] = os.pathsep.join([str(emcc_path.parent), env["PATH"]])
env["PATH"] = os.pathsep.join([str(emscripten_dir), env["PATH"]])
Comment thread
henryiii marked this conversation as resolved.

return env

Expand Down
3 changes: 2 additions & 1 deletion cibuildwheel/resources/build-platforms.toml
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,8 @@ python_configurations = [
[pyodide]
python_configurations = [
{ identifier = "cp312-pyodide_wasm32", version = "3.12", default_pyodide_version = "0.27.7", node_version = "v22" },
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason to remove 3.12 here?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, since I don't think it's useful to have three ABIs enabled at once. We don't support anything but the latest version. Pyodide 0.29.3 and 314.0.0a1 have two different ABIs, which should be enough? Since we don't have a stable 314.0.0 release and IMO cibuildwheel shouldn't be as disruptive to users' workflows, I think it's okay to keep 0.29.3 – but three different ABIs becomes a bit excessive. People can still build for arbitrary (read: older) versions, such as Pyodide 0.27.7, using CIBW_PYODIDE_VERSION. Or would you prefer I keep three ABIs?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the usage of the old versions? IMO, people can upgrade, and probably should, but it's also easy to forget. I'm sure I have webpages that are using old versions.

I think the pyemscripten tag is much more important than the one you can't upload to PyPI, so I think non-pyemscripten are really low priority, I don't mind dropping any of them.

Copy link
Copy Markdown
Contributor

@hoodmane hoodmane Apr 14, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Per jsdelivr, the most-used version is Python 3.12, followed by 3.13 and 3.10 which are almost tied.

Python 3.13: 2,033,897
Python 3.12: 6,602,877
Python 3.11:   697,276
Python 3.10: 1,929,739

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but three different ABIs becomes a bit excessive

What's the excess you're considering? The requirement for the user to grab 3 different emscripten toolchains?

I think that supporting 3 current + one prerelease version seems quite reasonable to me going forward. But perhaps we'd like to hide one or two behind a pyodide-eol enable flag to keep them off by default.

This current scenario might be an exception, though, as the package consumer is gonna need to upgrade something anyway, so I can see the argument to drop more aggressively here.

In summary, my (weakly held) opinion would be to drop 3.12 now, but going forward, I'm open to supporting more versions than the current behind a pyodide-eol flag.

Copy link
Copy Markdown
Member Author

@agriyakhetarpal agriyakhetarpal May 7, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, so I think pyodide-eol sounds like a good idea here – no need to drop support for older Pyodide versions if they're still going to work. I'll bump to Pyodide 0.29.4, that we released today, which allows pyemscripten wheels with the 2025 ABI.

Edit: okay, I have now added 3.12 back, behind a pyodide-eol flag. This means we will build for Pyodide 0.29.4/Python 3.13 by default. Users can build for Pyodide 314.0a1/Python 3.14 if they enable pyodide-prerelease.

{ identifier = "cp313-pyodide_wasm32", version = "3.13", default_pyodide_version = "0.29.3", node_version = "v22" },
{ identifier = "cp313-pyodide_wasm32", version = "3.13", default_pyodide_version = "0.29.4", node_version = "v22" },
{ identifier = "cp314-pyodide_wasm32", version = "3.14", default_pyodide_version = "314.0.0a1", node_version = "v24" },
]

[android]
Expand Down
40 changes: 20 additions & 20 deletions cibuildwheel/resources/constraints-pyodide312.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
# nox -s update_constraints
annotated-types==0.7.0
# via pydantic
auditwheel-emscripten==0.2.3
auditwheel-emscripten==0.2.4
# via pyodide-build
build==1.2.2.post1
build==1.5.0
# via
# -r .nox/update_constraints/tmp/constraints-pyodide.in
# pyodide-build
certifi==2026.2.25
certifi==2026.4.22
# via requests
charset-normalizer==3.4.6
charset-normalizer==3.4.7
# via requests
click==8.1.8
# via
Expand All @@ -19,54 +19,54 @@ click==8.1.8
# pyodide-cli
distlib==0.4.0
# via virtualenv
filelock==3.25.2
filelock==3.29.0
# via
# python-discovery
# virtualenv
idna==3.11
idna==3.13
# via requests
leb128==1.0.9
# via auditwheel-emscripten
markdown-it-py==4.0.0
markdown-it-py==4.2.0
# via rich
mdurl==0.1.2
# via markdown-it-py
packaging==26.0
packaging==26.2
# via
# auditwheel-emscripten
# build
# pyodide-build
# wheel
pip==26.0.1
pip==26.1.1
# via -r .nox/update_constraints/tmp/constraints-pyodide.in
platformdirs==4.9.4
platformdirs==4.9.6
# via
# pyodide-build
# python-discovery
# virtualenv
pydantic==2.12.5
pydantic==2.13.4
# via
# pyodide-build
# pyodide-lock
pydantic-core==2.41.5
pydantic-core==2.46.4
# via pydantic
pygments==2.19.2
pygments==2.20.0
# via rich
pyodide-build==0.33.0
pyodide-build==0.34.3
# via -r .nox/update_constraints/tmp/constraints-pyodide.in
pyodide-cli==0.5.0
# via
# auditwheel-emscripten
# pyodide-build
pyodide-lock==0.1.2
pyodide-lock==0.1.3
# via pyodide-build
pyproject-hooks==1.2.0
# via build
python-discovery==1.2.0
python-discovery==1.3.0
# via virtualenv
requests==2.32.5
requests==2.33.1
# via pyodide-build
rich==14.3.3
rich==15.0.0
# via
# pyodide-build
# pyodide-cli
Expand All @@ -81,11 +81,11 @@ typing-inspection==0.4.2
# via pydantic
urllib3==2.6.3
# via requests
virtualenv==21.2.0
virtualenv==21.3.1
# via
# build
# pyodide-build
wheel==0.46.3
wheel==0.47.0
# via
# auditwheel-emscripten
# pyodide-build
40 changes: 20 additions & 20 deletions cibuildwheel/resources/constraints-pyodide313.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
# nox -s update_constraints
annotated-types==0.7.0
# via pydantic
auditwheel-emscripten==0.2.3
auditwheel-emscripten==0.2.4
# via pyodide-build
build==1.2.2.post1
build==1.5.0
# via
# -r .nox/update_constraints/tmp/constraints-pyodide.in
# pyodide-build
certifi==2026.2.25
certifi==2026.4.22
# via requests
charset-normalizer==3.4.6
charset-normalizer==3.4.7
# via requests
click==8.1.8
# via
Expand All @@ -19,54 +19,54 @@ click==8.1.8
# pyodide-cli
distlib==0.4.0
# via virtualenv
filelock==3.25.2
filelock==3.29.0
# via
# python-discovery
# virtualenv
idna==3.11
idna==3.13
# via requests
leb128==1.0.9
# via auditwheel-emscripten
markdown-it-py==4.0.0
markdown-it-py==4.2.0
# via rich
mdurl==0.1.2
# via markdown-it-py
packaging==26.0
packaging==26.2
# via
# auditwheel-emscripten
# build
# pyodide-build
# wheel
pip==26.0.1
pip==26.1.1
# via -r .nox/update_constraints/tmp/constraints-pyodide.in
platformdirs==4.9.4
platformdirs==4.9.6
# via
# pyodide-build
# python-discovery
# virtualenv
pydantic==2.12.5
pydantic==2.13.4
# via
# pyodide-build
# pyodide-lock
pydantic-core==2.41.5
pydantic-core==2.46.4
# via pydantic
pygments==2.19.2
pygments==2.20.0
# via rich
pyodide-build==0.33.0
pyodide-build==0.34.3
# via -r .nox/update_constraints/tmp/constraints-pyodide.in
pyodide-cli==0.5.0
# via
# auditwheel-emscripten
# pyodide-build
pyodide-lock==0.1.2
pyodide-lock==0.1.3
# via pyodide-build
pyproject-hooks==1.2.0
# via build
python-discovery==1.2.0
python-discovery==1.3.0
# via virtualenv
requests==2.32.5
requests==2.33.1
# via pyodide-build
rich==14.3.3
rich==15.0.0
# via
# pyodide-build
# pyodide-cli
Expand All @@ -81,11 +81,11 @@ typing-inspection==0.4.2
# via pydantic
urllib3==2.6.3
# via requests
virtualenv==21.2.0
virtualenv==21.3.1
# via
# build
# pyodide-build
wheel==0.46.3
wheel==0.47.0
# via
# auditwheel-emscripten
# pyodide-build
91 changes: 91 additions & 0 deletions cibuildwheel/resources/constraints-pyodide314.txt
Comment thread
agriyakhetarpal marked this conversation as resolved.
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
# This file was autogenerated by uv via the following command:
# nox -s update_constraints
annotated-types==0.7.0
# via pydantic
auditwheel-emscripten==0.2.4
# via pyodide-build
build==1.5.0
# via
# -r .nox/update_constraints/tmp/constraints-pyodide.in
# pyodide-build
certifi==2026.4.22
# via requests
charset-normalizer==3.4.7
# via requests
click==8.1.8
# via
# -r .nox/update_constraints/tmp/constraints-pyodide.in
# pyodide-build
# pyodide-cli
distlib==0.4.0
# via virtualenv
filelock==3.29.0
# via
# python-discovery
# virtualenv
idna==3.13
# via requests
leb128==1.0.9
# via auditwheel-emscripten
markdown-it-py==4.2.0
# via rich
mdurl==0.1.2
# via markdown-it-py
packaging==26.2
# via
# auditwheel-emscripten
# build
# pyodide-build
# wheel
pip==26.1.1
# via -r .nox/update_constraints/tmp/constraints-pyodide.in
platformdirs==4.9.6
# via
# pyodide-build
# python-discovery
# virtualenv
pydantic==2.13.4
# via
# pyodide-build
# pyodide-lock
pydantic-core==2.46.4
# via pydantic
pygments==2.20.0
# via rich
pyodide-build==0.34.3
# via -r .nox/update_constraints/tmp/constraints-pyodide.in
pyodide-cli==0.5.0
# via
# auditwheel-emscripten
# pyodide-build
pyodide-lock==0.1.3
# via pyodide-build
pyproject-hooks==1.2.0
# via build
python-discovery==1.3.0
# via virtualenv
requests==2.33.1
# via pyodide-build
rich==15.0.0
# via
# pyodide-build
# pyodide-cli
ruamel-yaml==0.19.1
# via pyodide-build
typing-extensions==4.15.0
# via
# pydantic
# pydantic-core
# typing-inspection
typing-inspection==0.4.2
# via pydantic
urllib3==2.6.3
# via requests
virtualenv==21.3.1
# via
# build
# pyodide-build
wheel==0.47.0
# via
# auditwheel-emscripten
# pyodide-build
Loading
Loading