diff --git a/README.md b/README.md index da646d65..7f7a92f8 100644 --- a/README.md +++ b/README.md @@ -484,82 +484,3 @@ K. He, R. Newbury, T. Tran, J. Haviland, B. Burgess-Limerick, D. Kulić, P. Cork

- -
- -## Build a JupyterLite/Pyodide Wasm wheel - -[Pyodide](https://pyodide.org/) is a full CPython distribution compiled to -WebAssembly, which is what lets the "Try it Now" JupyterLite deployment above -run this toolbox entirely client-side, no server required. Each Pyodide -release embeds one specific CPython version, and a wasm wheel is tagged with -the CPython version it was built for (`cp312`, `cp313`, ...) -— a wheel only -loads if its tag matches the CPython embedded in the Pyodide runtime actually -running. JupyterLite doesn't bundle Pyodide directly either: the -`jupyterlite-pyodide-kernel` package pulls in a specific Pyodide version per -its own release, so bumping that one package can silently change which wheel -tag your deployment now needs -— this is the single sharpest edge in this -whole pipeline. This repo's live deployment currently pins -`jupyterlite-pyodide-kernel==0.6.1` (see `.github/workflows/ci.yml`), which -embeds Pyodide 0.27.6 / CPython 3.12 — hence `cp312` below. - -Also note Pyodide's own version numbering changed in 2026: releases up to -`0.29.x` used an independent `0.x` scheme, but from Pyodide `314.0.0` onward -the version number tracks the embedded CPython version directly (`314` = -Python 3.14). "Current" no longer means a `0.x` version. - -### Use the published wheel (recommended) - -PyPI rejects the `pyodide_*` platform tag, so Wasm wheels can't be published -there -— instead, every GitHub release attaches ready-built wheels (for each -supported CPython version) as release assets. Download the one matching your -deployment's CPython version, e.g.: - -```shell script -gh release download --repo petercorke/robotics-toolbox-python --pattern '*cp312*pyodide*' -``` - -This is exactly what `ci.yml`'s `docs-build` job does to populate the live -"Try it Now" site — most people should do this rather than building locally. - -### Build locally - -Only needed to test an unreleased change, or to target a different -CPython/Pyodide pin than the current release. Uses cibuildwheel's Pyodide -platform: - -```shell script -make wheel-pyodide -``` - -Optionally pin the Pyodide runtime to match a different JupyterLite -deployment than this project's own: - -```shell script -PYODIDE_VERSION=0.27.6 make wheel-pyodide -``` - -The target writes to `dist/` and runs `make wheel-pyodide-check`, which validates -the wheel filename contains: - -- `cp312-cp312` -- `wasm32` -- `pyemscripten__` or `pyodide__` - -To inspect the produced artifact path: - -```shell script -ls -1 dist/*wasm32*.whl -``` - -### References - -- [Pyodide release notes](https://github.com/pyodide/pyodide/releases) — - confirms what CPython version a given Pyodide tag embeds, including the - 2026 versioning-scheme change. -- [jupyterlite-pyodide-kernel changelog](https://github.com/jupyterlite/pyodide-kernel/blob/main/CHANGELOG.md) — - the authoritative source for which Pyodide version a given kernel package - release bundles. -- [cibuildwheel Pyodide platform docs](https://cibuildwheel.pypa.io/en/stable/platforms/#pyodide-webassembly). - -
\ No newline at end of file