Skip to content

Install MITTENS from PyPI wheels; no Rust toolchain needed - #21

Merged
arokem merged 3 commits into
mainfrom
mittens-from-pypi
Nov 19, 2026
Merged

arokem merged 3 commits into
mainfrom
mittens-from-pypi

Conversation

@mattcieslak

@mattcieslak mattcieslak commented Nov 18, 2026 •

Copy link
Copy Markdown
Collaborator

Installing MPAT no longer needs a Rust toolchain.

MPAT itself is pure Python. The Rust came from its MITTENS v2 dependency, which MPAT pinned to the MITTENS GitHub repository, so pip compiled it from source with Rust and maturin. mittens-dmri is now on PyPI (2.0.0a1) with prebuilt abi3 wheels covering Python 3.10 and newer on:

  • Linux x86_64 and aarch64;
  • macOS Intel and Apple Silicon;
  • Windows x64.

Changes

  • pyproject.toml: depends on mittens-dmri>=2.0.0a1 instead of the GitHub URL. Naming the pre-release in the specifier lets pip install it without --pre.

  • README and docs/source/install.md:

    • drop the maturin / Rust step;
    • say where MITTENS comes from;
    • note that only platforms without a wheel still build it from source, which needs Rust;
    • point the install command at rokemlab/MPAT instead of 36000/MPAT.
  • CI (test.yml, docs.yml): drop the Rust toolchain, Rust cache and maturin steps, which were only there to build MITTENS.

  • Docs link check (also failing on main):

    • usage.md links ParticipantAFQ's new page, since pyAFQ moved its API pages;
    • conf.py skips DOIs from AGU (10.1029/) and SIAM (10.1137/). Those publishers answer automated requests with 403 Forbidden, although the DOIs resolve.

Testing

  • In a fresh Python 3.12 environment, pip install ".[test]" with PIP_ONLY_BINARY=mittens-dmri installed MITTENS from the wheel, without compiling.
  • pytest tests passes against that install.
  • MPAT's uses of MITTENS work with the wheel: PathTable on the 642-direction sphere, neighbor_offsets, and mittens.io (default_sphere, sh_basis_matrix, OdfData).

This also lowers the bar for people trying MPAT through TRXViz 0.7.0. Its MPAT guide sends users to this install page.

mittens-dmri 2.0.0a1 is on PyPI with prebuilt abi3 wheels for Linux,
macOS and Windows, so MPAT no longer needs to pin it to GitHub and
compile it with Rust and maturin.

- Depend on mittens-dmri>=2.0.0a1; naming the pre-release lets pip pick
  it without --pre.
- README and the install page drop the maturin/Rust step and point at
  rokemlab/MPAT.
- CI drops the Rust toolchain, cache and maturin steps.
@arokem

arokem commented Nov 19, 2026

Copy link
Copy Markdown
Contributor

I believe this needs a rebase to build cleanly on the CI

- usage.md: pyAFQ moved its API pages; link ParticipantAFQ's new page.
- conf.py: skip DOIs from AGU (10.1029) and SIAM (10.1137) in the link
  check. Those publishers answer automated requests with 403 Forbidden,
  though the DOIs resolve.
@arokem
arokem merged commit 597a944 into main Nov 19, 2026
5 checks passed
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