Skip to content

Commit d2c0e59

Browse files
agriyakhetarpalhoodmaneryanking13henryiii
authored
feat: pyemscripten platform tag (PEP 783), 314.0a1, pyodide-eol flag, and maintenance updates (#2812)
* Use `pyodide config get emscripten_dir` * Update constraints * Updates for `pyemscripten` platform tag * Weird constraints stuff... * Revert "Weird constraints stuff..." This reverts commit 4bd785d. * Add some special constraints for pyodide * Wheel pyemscripten collision * Put delocate back in constraints (not needed tho) * Drop Pyodide 0.27.7 (cp312-pyodide_wasm32) * Add Pyodide 314.0.0a1 (cp314-pyodide_wasm32) * Delete no-longer-needed Pyodide 312 constraints * Update Pyodide 313 and 314 constraints * Add back prerelease stuff and update tests * Fix `test_pyodide_on_windows` * Update and fix tests some more * Also enable pyodide-prerelease in GHA sample build * Update tests yet again (`SINGLE_PYTHON_VERSION` changes) * Add a Pyodide-specific maintenance guide * Add suggestions from Hood and Gyeongjae Co-Authored-By: Hood Chatham <roberthoodchatham@gmail.com> Co-Authored-By: Gyeongjae Choi <def6488@gmail.com> * Add "Last updated: May 2026" to Pyodide document * Add a Pyodide EOL filter * Fix typo * Update maintenance docs about EoL Pyodide * Add Pyodide 312 constraints back * Update Pyodide 313 and 314 constraints * Remove "experimental" note about Pyodide * Remove another experimental Pyodide sentence * Add docs about the `pyodide-eol` enable option --------- Co-authored-by: Hood Chatham <roberthoodchatham@gmail.com> Co-authored-by: Gyeongjae Choi <def6488@gmail.com> Co-authored-by: Henry Schreiner <henryfs@princeton.edu>
1 parent 542335f commit d2c0e59

20 files changed

Lines changed: 343 additions & 99 deletions

.github/workflows/test.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -321,11 +321,13 @@ jobs:
321321
output-dir: wheelhouse
322322
env:
323323
CIBW_PLATFORM: pyodide
324+
CIBW_ENABLE: pyodide-prerelease
324325

325326
- name: Run tests with 'CIBW_PLATFORM' set to 'pyodide'
326327
run: uv run --no-sync ./bin/run_tests.py
327328
env:
328329
CIBW_PLATFORM: pyodide
330+
CIBW_ENABLE: pyodide-prerelease
329331

330332
test-uv-extras:
331333
name: Test uv extra on ${{ matrix.os }} ${{ matrix.test_select }}

cibuildwheel/platforms/pyodide.py

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -94,29 +94,28 @@ def ensure_node(major_version: str) -> Path:
9494
return path
9595

9696

97-
def install_emscripten(
98-
env: dict[str, str], version: str, xbuildenv_cache_path: Path, pyodide_version: str
99-
) -> Path:
97+
def install_emscripten(env: dict[str, str], version: str, xbuildenv_cache_path: Path) -> Path:
10098
"""Install Emscripten via pyodide-build, which also applies Pyodide-specific patches."""
101-
emcc_path = (
102-
xbuildenv_cache_path / pyodide_version / "emsdk" / "upstream" / "emscripten" / "emcc"
99+
emscripten_dir = Path(
100+
call("pyodide", "config", "get", "emscripten_dir", env=env, capture_stdout=True).strip()
103101
)
104102
with FileLock(CIBW_CACHE_PATH / "emscripten.lock"):
105-
if emcc_path.exists():
106-
return emcc_path
103+
if emscripten_dir.exists():
104+
return emscripten_dir
107105
call(
108106
"pyodide",
109107
"xbuildenv",
110108
"install-emscripten",
109+
"--force",
111110
"--version",
112111
version,
113112
"--path",
114113
str(xbuildenv_cache_path),
115114
env=env,
116115
cwd=CIBW_CACHE_PATH,
117116
)
118-
assert emcc_path.exists()
119-
return emcc_path
117+
assert emscripten_dir.exists()
118+
return emscripten_dir
120119

121120

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

320-
env["PATH"] = os.pathsep.join([str(emcc_path.parent), env["PATH"]])
319+
env["PATH"] = os.pathsep.join([str(emscripten_dir), env["PATH"]])
321320

322321
return env
323322

cibuildwheel/resources/build-platforms.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,8 @@ python_configurations = [
206206
[pyodide]
207207
python_configurations = [
208208
{ identifier = "cp312-pyodide_wasm32", version = "3.12", default_pyodide_version = "0.27.7", node_version = "v22" },
209-
{ identifier = "cp313-pyodide_wasm32", version = "3.13", default_pyodide_version = "0.29.3", node_version = "v22" },
209+
{ identifier = "cp313-pyodide_wasm32", version = "3.13", default_pyodide_version = "0.29.4", node_version = "v22" },
210+
{ identifier = "cp314-pyodide_wasm32", version = "3.14", default_pyodide_version = "314.0.0a1", node_version = "v24" },
210211
]
211212

212213
[android]

cibuildwheel/resources/constraints-pyodide312.txt

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22
# nox -s update_constraints
33
annotated-types==0.7.0
44
# via pydantic
5-
auditwheel-emscripten==0.2.3
5+
auditwheel-emscripten==0.2.4
66
# via pyodide-build
7-
build==1.2.2.post1
7+
build==1.5.0
88
# via
99
# -r .nox/update_constraints/tmp/constraints-pyodide.in
1010
# pyodide-build
11-
certifi==2026.2.25
11+
certifi==2026.4.22
1212
# via requests
13-
charset-normalizer==3.4.6
13+
charset-normalizer==3.4.7
1414
# via requests
1515
click==8.1.8
1616
# via
@@ -19,54 +19,54 @@ click==8.1.8
1919
# pyodide-cli
2020
distlib==0.4.0
2121
# via virtualenv
22-
filelock==3.25.2
22+
filelock==3.29.0
2323
# via
2424
# python-discovery
2525
# virtualenv
26-
idna==3.11
26+
idna==3.13
2727
# via requests
2828
leb128==1.0.9
2929
# via auditwheel-emscripten
30-
markdown-it-py==4.0.0
30+
markdown-it-py==4.2.0
3131
# via rich
3232
mdurl==0.1.2
3333
# via markdown-it-py
34-
packaging==26.0
34+
packaging==26.2
3535
# via
3636
# auditwheel-emscripten
3737
# build
3838
# pyodide-build
3939
# wheel
40-
pip==26.0.1
40+
pip==26.1.1
4141
# via -r .nox/update_constraints/tmp/constraints-pyodide.in
42-
platformdirs==4.9.4
42+
platformdirs==4.9.6
4343
# via
4444
# pyodide-build
4545
# python-discovery
4646
# virtualenv
47-
pydantic==2.12.5
47+
pydantic==2.13.4
4848
# via
4949
# pyodide-build
5050
# pyodide-lock
51-
pydantic-core==2.41.5
51+
pydantic-core==2.46.4
5252
# via pydantic
53-
pygments==2.19.2
53+
pygments==2.20.0
5454
# via rich
55-
pyodide-build==0.33.0
55+
pyodide-build==0.34.3
5656
# via -r .nox/update_constraints/tmp/constraints-pyodide.in
5757
pyodide-cli==0.5.0
5858
# via
5959
# auditwheel-emscripten
6060
# pyodide-build
61-
pyodide-lock==0.1.2
61+
pyodide-lock==0.1.3
6262
# via pyodide-build
6363
pyproject-hooks==1.2.0
6464
# via build
65-
python-discovery==1.2.0
65+
python-discovery==1.3.0
6666
# via virtualenv
67-
requests==2.32.5
67+
requests==2.33.1
6868
# via pyodide-build
69-
rich==14.3.3
69+
rich==15.0.0
7070
# via
7171
# pyodide-build
7272
# pyodide-cli
@@ -81,11 +81,11 @@ typing-inspection==0.4.2
8181
# via pydantic
8282
urllib3==2.6.3
8383
# via requests
84-
virtualenv==21.2.0
84+
virtualenv==21.3.1
8585
# via
8686
# build
8787
# pyodide-build
88-
wheel==0.46.3
88+
wheel==0.47.0
8989
# via
9090
# auditwheel-emscripten
9191
# pyodide-build

cibuildwheel/resources/constraints-pyodide313.txt

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22
# nox -s update_constraints
33
annotated-types==0.7.0
44
# via pydantic
5-
auditwheel-emscripten==0.2.3
5+
auditwheel-emscripten==0.2.4
66
# via pyodide-build
7-
build==1.2.2.post1
7+
build==1.5.0
88
# via
99
# -r .nox/update_constraints/tmp/constraints-pyodide.in
1010
# pyodide-build
11-
certifi==2026.2.25
11+
certifi==2026.4.22
1212
# via requests
13-
charset-normalizer==3.4.6
13+
charset-normalizer==3.4.7
1414
# via requests
1515
click==8.1.8
1616
# via
@@ -19,54 +19,54 @@ click==8.1.8
1919
# pyodide-cli
2020
distlib==0.4.0
2121
# via virtualenv
22-
filelock==3.25.2
22+
filelock==3.29.0
2323
# via
2424
# python-discovery
2525
# virtualenv
26-
idna==3.11
26+
idna==3.13
2727
# via requests
2828
leb128==1.0.9
2929
# via auditwheel-emscripten
30-
markdown-it-py==4.0.0
30+
markdown-it-py==4.2.0
3131
# via rich
3232
mdurl==0.1.2
3333
# via markdown-it-py
34-
packaging==26.0
34+
packaging==26.2
3535
# via
3636
# auditwheel-emscripten
3737
# build
3838
# pyodide-build
3939
# wheel
40-
pip==26.0.1
40+
pip==26.1.1
4141
# via -r .nox/update_constraints/tmp/constraints-pyodide.in
42-
platformdirs==4.9.4
42+
platformdirs==4.9.6
4343
# via
4444
# pyodide-build
4545
# python-discovery
4646
# virtualenv
47-
pydantic==2.12.5
47+
pydantic==2.13.4
4848
# via
4949
# pyodide-build
5050
# pyodide-lock
51-
pydantic-core==2.41.5
51+
pydantic-core==2.46.4
5252
# via pydantic
53-
pygments==2.19.2
53+
pygments==2.20.0
5454
# via rich
55-
pyodide-build==0.33.0
55+
pyodide-build==0.34.3
5656
# via -r .nox/update_constraints/tmp/constraints-pyodide.in
5757
pyodide-cli==0.5.0
5858
# via
5959
# auditwheel-emscripten
6060
# pyodide-build
61-
pyodide-lock==0.1.2
61+
pyodide-lock==0.1.3
6262
# via pyodide-build
6363
pyproject-hooks==1.2.0
6464
# via build
65-
python-discovery==1.2.0
65+
python-discovery==1.3.0
6666
# via virtualenv
67-
requests==2.32.5
67+
requests==2.33.1
6868
# via pyodide-build
69-
rich==14.3.3
69+
rich==15.0.0
7070
# via
7171
# pyodide-build
7272
# pyodide-cli
@@ -81,11 +81,11 @@ typing-inspection==0.4.2
8181
# via pydantic
8282
urllib3==2.6.3
8383
# via requests
84-
virtualenv==21.2.0
84+
virtualenv==21.3.1
8585
# via
8686
# build
8787
# pyodide-build
88-
wheel==0.46.3
88+
wheel==0.47.0
8989
# via
9090
# auditwheel-emscripten
9191
# pyodide-build
Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
# This file was autogenerated by uv via the following command:
2+
# nox -s update_constraints
3+
annotated-types==0.7.0
4+
# via pydantic
5+
auditwheel-emscripten==0.2.4
6+
# via pyodide-build
7+
build==1.5.0
8+
# via
9+
# -r .nox/update_constraints/tmp/constraints-pyodide.in
10+
# pyodide-build
11+
certifi==2026.4.22
12+
# via requests
13+
charset-normalizer==3.4.7
14+
# via requests
15+
click==8.1.8
16+
# via
17+
# -r .nox/update_constraints/tmp/constraints-pyodide.in
18+
# pyodide-build
19+
# pyodide-cli
20+
distlib==0.4.0
21+
# via virtualenv
22+
filelock==3.29.0
23+
# via
24+
# python-discovery
25+
# virtualenv
26+
idna==3.13
27+
# via requests
28+
leb128==1.0.9
29+
# via auditwheel-emscripten
30+
markdown-it-py==4.2.0
31+
# via rich
32+
mdurl==0.1.2
33+
# via markdown-it-py
34+
packaging==26.2
35+
# via
36+
# auditwheel-emscripten
37+
# build
38+
# pyodide-build
39+
# wheel
40+
pip==26.1.1
41+
# via -r .nox/update_constraints/tmp/constraints-pyodide.in
42+
platformdirs==4.9.6
43+
# via
44+
# pyodide-build
45+
# python-discovery
46+
# virtualenv
47+
pydantic==2.13.4
48+
# via
49+
# pyodide-build
50+
# pyodide-lock
51+
pydantic-core==2.46.4
52+
# via pydantic
53+
pygments==2.20.0
54+
# via rich
55+
pyodide-build==0.34.3
56+
# via -r .nox/update_constraints/tmp/constraints-pyodide.in
57+
pyodide-cli==0.5.0
58+
# via
59+
# auditwheel-emscripten
60+
# pyodide-build
61+
pyodide-lock==0.1.3
62+
# via pyodide-build
63+
pyproject-hooks==1.2.0
64+
# via build
65+
python-discovery==1.3.0
66+
# via virtualenv
67+
requests==2.33.1
68+
# via pyodide-build
69+
rich==15.0.0
70+
# via
71+
# pyodide-build
72+
# pyodide-cli
73+
ruamel-yaml==0.19.1
74+
# via pyodide-build
75+
typing-extensions==4.15.0
76+
# via
77+
# pydantic
78+
# pydantic-core
79+
# typing-inspection
80+
typing-inspection==0.4.2
81+
# via pydantic
82+
urllib3==2.6.3
83+
# via requests
84+
virtualenv==21.3.1
85+
# via
86+
# build
87+
# pyodide-build
88+
wheel==0.47.0
89+
# via
90+
# auditwheel-emscripten
91+
# pyodide-build

0 commit comments

Comments
 (0)