Add Pyodide (WASM) wheel build and release asset - #1960
Conversation
|
@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 😄 |
lucianopaz
left a comment
There was a problem hiding this comment.
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?
You sure are, I wasn't seeing the ericmjl prefix before on my desktop. On the mobile I see |
|
@lucianopaz addressed your comment too. |
4d82c0f to
0e6aa46
Compare
0e6aa46 to
a305593
Compare
|
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
|
@ericmjl, heads-up in case you didn't notice, there are lots of merge conflicts from your last force-push. |
|
just the branch target |
|
Hi, This is Anutosh here (Jupyterlite, LLVM, Clang, Clang-Repl & Emscripten-Forge maintainer/contributor) I have successfully built numba & llvmlite for wasm. I spoke about upstreaming my patches in the Numba community call yesterday and we should be making progress there. For more technical details go through my comment here : numba/numba#3284 (comment) You can try out Numba in Jupyterlite here : https://notebook.link/@anutosh491/numba I had interacted with Thomas Wiecki (@twiecki) about 2 weeks back on my LinkedIn post talking about how PyTensor could benefit out of this. Hence I went ahead and built PyTensor for wasm enabling Numba as PyTensor's WebAssembly linker. Check it out here, I have hosted a simple demo notebook to start with : https://notebook.link/@anutosh491/PyTensor (enable the debug logs to see how numba functions in the backend) cc @ricardoV94 @maresb @lucianopaz Feel free to contact us (me, @SylvainCorlay or @MMesch) at QuantStack for more details. We are the main authors of Jupyterlite and would like to host a Jupyterlite notebook in PyTensor's readme. We should possibly be able to shift tutorials or examples that users want to try out in Jupyterlite itself. |
- 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
…tprops action Made-with: Cursor
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.
a305593 to
3596bde
Compare
|
Alrighty, @ricardoV94 and @maresb -- looks like we're in a good spot now. |
Summary
setup.py bdist_wheel --universal) with a proper pyodide-build + Emscripten job that produces a wasm32 wheel.pyodideinpyproject.tomland documents the manual Pyodide build in the dev guide; no Pixi or other new tooling..pixifrom pre-commit sphinx-lint args, andconda/mamba/pixi→conda/mambain 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, uploadpyodide_wheelartifact.upload_pyodide_to_release: On release published, downloadpyodide_wheeland attach to the release viasoftprops/action-gh-release.upload_pypi: No longer downloads or uploads the olduniversal_wheel; PyPI receives only sdist + cibuildwheel platform wheels.Made with Cursor