Skip to content

ENH: build the dev MNE wheel for JupyterLite (JupyterLite split 2/5) - #14135

Draft
natinew77-creator wants to merge 9 commits into
mne-tools:mainfrom
natinew77-creator:lite-wheel-build
Draft

ENH: build the dev MNE wheel for JupyterLite (JupyterLite split 2/5)#14135
natinew77-creator wants to merge 9 commits into
mne-tools:mainfrom
natinew77-creator:lite-wheel-build

Conversation

@natinew77-creator

@natinew77-creator natinew77-creator commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Part 2 of the split of #13925. Part 1 is #14128.

Adds doc/sphinxext/build_lite_wheel.py, which builds MNE as 9999.0.1 into doc/pypi. The piplite addon picks wheels up from there, so the browser kernel installs the development version rather than the older PyPI release. A CircleCI step runs it once before Sphinx.

Pyodide can ship scipy and matplotlib older than MNE's declared minimums, so the script relaxes those two bounds while building and restores pyproject.toml in a finally block, including when the build fails. numpy is left alone, since MNE requires 2.0 and Pyodide ships 2.x.

Nothing installs the wheel yet. The Sphinx wiring follows in the next PR along with the list of pages that get an "Open in JupyterLite" badge, so badges do not land on pages that cannot run in the browser.

Adds a script that builds MNE as 9999.0.1 into doc/pypi, where the
jupyterlite-pyodide-kernel piplite addon picks it up, and the CircleCI step
that runs it once before Sphinx.
@natinew77-creator

Copy link
Copy Markdown
Contributor Author

@teonbrooks PR 2 of the split is up. Thanks!

@teonbrooks

Copy link
Copy Markdown
Member

I noticed that the scipy and matplotlib packages should be compatible with MNE https://pyodide.org/en/stable/usage/packages-in-pyodide.html

do you know what version of Pyodide is being used? it may be that we need to bump the version of jupyterlite, which in terms bumps pyodide-kernel. it looks like the latest version of pyodide-kernel uses the 314 version of pyodide, which is built on 3.14 Python
https://github.com/jupyterlite/pyodide-kernel

Pyodide 0.29.3 already ships scipy 1.14.1 and numpy 2.2.5, which satisfy MNE.
Only matplotlib 3.8.4 falls short, so relax that bound and leave the rest.
@natinew77-creator

Copy link
Copy Markdown
Contributor Author

I noticed that the scipy and matplotlib packages should be compatible with MNE https://pyodide.org/en/stable/usage/packages-in-pyodide.html

do you know what version of Pyodide is being used? it may be that we need to bump the version of jupyterlite, which in terms bumps pyodide-kernel. it looks like the latest version of pyodide-kernel uses the 314 version of pyodide, which is built on 3.14 Python https://github.com/jupyterlite/pyodide-kernel

Thanks for flagging. We're on Pyodide 0.29.3 (Python 3.13.2), from
jupyterlite-pyodide-kernel 0.7.2.
It ships scipy 1.14.1 and numpy 2.2.5, both fine for MNE, and
matplotlib 3.8.4, just under 3.9. So you're right on scipy, it never
needed relaxing. Dropped that line, kept matplotlib.

I did try the bump. It builds and loads Pyodide 314.0.1, where
matplotlib is 3.10.8. Since #13925 was verified against 0.29.3
throughout, I'd rather do it as a follow-up. Happy either way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants