Skip to content

Add Pyodide (WASM) wheel build and release asset#1960

Open
ericmjl wants to merge 5 commits intopymc-devs:mainfrom
ericmjl:pyodide-wasm-build-and-release
Open

Add Pyodide (WASM) wheel build and release asset#1960
ericmjl wants to merge 5 commits intopymc-devs:mainfrom
ericmjl:pyodide-wasm-build-and-release

Conversation

@ericmjl
Copy link
Copy Markdown
Member

@ericmjl ericmjl commented Mar 8, 2026

Summary

  • Replaces the old "Build universal wheel for Pyodide" job (PYODIDE=1 + setup.py bdist_wheel --universal) with a proper pyodide-build + Emscripten job that produces a wasm32 wheel.
  • Adds a job that uploads the Pyodide wheel to the GitHub Release as an asset when a release is published (PyPI does not yet accept wasm32 wheels).
  • Adds optional dependency pyodide in pyproject.toml and documents the manual Pyodide build in the dev guide; no Pixi or other new tooling.
  • Removes Pixi-only references: .pixi from pre-commit sphinx-lint args, and conda/mamba/pixiconda/mamba in cmodule and troubleshooting docs.

Numba remains optional on wasm via existing environment markers, so the Pyodide wheel is micropip-installable without numba.

CI changes

  • build_pyodide_wheel: Python 3.12, install pyodide-build, get Emscripten version, mymindstorm/setup-emsdk, pip install -e ".[pyodide]", pyodide build, upload pyodide_wheel artifact.
  • upload_pyodide_to_release: On release published, download pyodide_wheel and attach to the release via softprops/action-gh-release.
  • upload_pypi: No longer downloads or uploads the old universal_wheel; PyPI receives only sdist + cibuildwheel platform wheels.

Made with Cursor

@ericmjl ericmjl requested review from Armavica and ricardoV94 March 8, 2026 22:57
@ricardoV94
Copy link
Copy Markdown
Member

@ericmjl for future reference we prefer devs to contribute from their forks instead of working on the main repo directly

@ericmjl
Copy link
Copy Markdown
Member Author

ericmjl commented Mar 10, 2026

@ericmjl for future reference we prefer devs to contribute from their forks instead of working on the main repo directly

I'm pretty sure I'm working from my own fork 😄

Copy link
Copy Markdown
Member

@lucianopaz lucianopaz left a comment

Choose a reason for hiding this comment

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

Wouldn't it be good to add a line some in the README.md or the docs landing page saying how to install on a wasm environment? Wouldn't users have to put in the full url of the github release to install?

@ricardoV94
Copy link
Copy Markdown
Member

@ericmjl for future reference we prefer devs to contribute from their forks instead of working on the main repo directly

I'm pretty sure I'm working from my own fork 😄

You sure are, I wasn't seeing the ericmjl prefix before on my desktop. On the mobile I see

@ericmjl
Copy link
Copy Markdown
Member Author

ericmjl commented Mar 14, 2026

@lucianopaz addressed your comment too.

ericmjl added 5 commits March 27, 2026 07:44
- Replace old 'Build universal wheel for Pyodide' job with proper pyodide-build
  + Emscripten job: Python 3.12, pyodide-build, setup-emsdk, pip install -e .[pyodide], pyodide build
  + Upload artifact pyodide_wheel (dist/*wasm32.whl)
- Add job to upload Pyodide wheel to GitHub Release on publish (PyPI does not accept wasm32 yet)
- Add optional dependency pyodide = [pyodide-build>=0.29.2] and document manual build in dev guide
- Remove Pixi references: .pixi from pre-commit sphinx-lint args, conda/mamba/pixi -> conda/mamba in cmodule and troubleshooting
- upload_pypi no longer downloads universal_wheel; PyPI gets only sdist + cibuildwheel wheels
- Numba remains optional on wasm via existing env markers (micropip install works without numba)

Made-with: Cursor
- Restore pixi references in docs and warnings (previously removed without explanation)
- Restore helpful workflow comments in pypi.yml
- Move Pyodide build docs from dev_start_guide to install.rst (more appropriate location)
- Add user-facing WASM/Pyodide installation instructions in install.rst
Addresses lucianopaz's feedback: make WASM installation instructions
discoverable from the README and docs index, not just install.rst.
@ericmjl ericmjl force-pushed the pyodide-wasm-build-and-release branch from 4d82c0f to 0e6aa46 Compare March 27, 2026 11:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants