Skip to content

Commit 92714ac

Browse files
committed
Publish Pyodide wheels to PyPI (PEP 783)
cibuildwheel >= 4.0 tags Pyodide wheels with the PEP 783 pyemscripten_* platform that PyPI accepts (3.x emitted pyodide_2024_0, which it rejects), so stop diverting the wheel to the GitHub release and publish it to PyPI with the native wheels. Closes #304
1 parent deca318 commit 92714ac

1 file changed

Lines changed: 9 additions & 12 deletions

File tree

.github/workflows/ci.yml

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,17 @@ jobs:
4545
- name: Set up Python
4646
uses: actions/setup-python@v5
4747
with:
48-
# Must match Pyodide's Python version (0.28.x uses 3.13)
48+
# Host Python must match cibuildwheel's default stable Pyodide ABI
49+
# (Pyodide 0.28/0.29.x -> pyemscripten_2025_0 -> CPython 3.13). If a
50+
# future cibuildwheel bumps its default stable Pyodide to a newer
51+
# CPython, bump this in lockstep (or pin pyodide-version) or the
52+
# cross-build will fail.
4953
python-version: "3.13"
5054
- name: Install cibuildwheel
51-
run: pip install cibuildwheel
55+
# cibuildwheel >= 4.0 tags Pyodide wheels with the PEP 783 pyemscripten_*
56+
# platform, which PyPI accepts. Older versions emit pyodide_2024_0, which
57+
# PyPI rejects.
58+
run: pip install "cibuildwheel>=4.0"
5259
- name: Build and test Pyodide wheel
5360
run: python -m cibuildwheel --platform pyodide --output-dir wheelhouse
5461
- uses: actions/upload-artifact@v4
@@ -89,11 +96,6 @@ jobs:
8996
for wheel_dir in wheelhouse/uharfbuzz*/; do
9097
mv "${wheel_dir}"/*.whl dist/
9198
done
92-
# Separate Pyodide wheels (PyPI doesn't accept wasm32 wheels yet)
93-
# https://github.com/pypi/warehouse/issues/10416
94-
# https://discuss.python.org/t/pep-783-emscripten-packaging
95-
mkdir -p dist-pyodide/
96-
mv dist/*pyodide*.whl dist-pyodide/ 2>/dev/null || true
9799
- name: Extract release notes from annotated tag message
98100
id: release_notes
99101
env:
@@ -131,11 +133,6 @@ jobs:
131133
--title "${{ env.RELEASE_NAME }}" \
132134
$notes \
133135
$prerelease
134-
- name: Upload Pyodide wheel to GitHub release
135-
run: |
136-
if [ -d dist-pyodide ] && [ "$(ls -A dist-pyodide)" ]; then
137-
gh release upload ${{ github.ref_name }} dist-pyodide/*.whl
138-
fi
139136
- name: Build sdist
140137
run: |
141138
if [ "$IS_PRERELEASE" == true ]; then

0 commit comments

Comments
 (0)