EMRY-036: maturin packaging (pip install builds the native wheel) #74

Merged
vxfemboy merged 1 commit from emry-036-packaging into main 2026-06-25 17:48:55 +00:00
vxfemboy commented 2026-06-25 17:06:37 +00:00 (Migrated from github.com)

Closes #27 (EMRY-036). Branched off main. Completes M3.

What

Switch the Python build backend from setuptools → maturin, so pip install emry / pip install -e compile the native emry._native extension and bundle it with the pure-Python package as an abi3 wheel (one wheel works on any Python ≥ 3.10). Adds a [torch] extra.

CI

  • python job gains the Rust toolchain — the package build now compiles the native ext during install.
  • new wheels job: maturin build (abi3 wheel) + maturin sdist, then installs the wheel in a clean venv and verifies import emry, emry._native — and uploads dist artifacts.

Verification (local)

  • Fresh-venv pip install -e ".[dev]" builds the native ext; pytest green (79 passed, 2 skipped = numpy/torch optional; the native tests now run since the ext is built).
  • maturin build + maturin sdist → clean-venv install from the wheel → import emry._native works (emry-0.1.0-cp310-abi3-manylinux_2_34_x86_64.whl).

Risk note

This changes how the package installs (maturin, not setuptools) and adds Rust to the Python CI path — both verified locally as far as possible; watching the python + wheels CI jobs. PyPI publish automation (token-gated, on tag) is deferred to the release work (EMRY-057/M5).

Closes #27 (EMRY-036). Branched off `main`. **Completes M3.** ## What Switch the Python build backend from setuptools → **maturin**, so `pip install emry` / `pip install -e` compile the native `emry._native` extension and bundle it with the pure-Python package as an **abi3 wheel** (one wheel works on any Python ≥ 3.10). Adds a `[torch]` extra. ## CI - **python job** gains the Rust toolchain — the package build now compiles the native ext during install. - **new wheels job**: `maturin build` (abi3 wheel) + `maturin sdist`, then installs the wheel in a clean venv and verifies `import emry, emry._native` — and uploads dist artifacts. ## Verification (local) - Fresh-venv `pip install -e ".[dev]"` builds the native ext; `pytest` green (79 passed, 2 skipped = numpy/torch optional; the native tests now **run** since the ext is built). - `maturin build` + `maturin sdist` → clean-venv install from the wheel → `import emry._native` works (`emry-0.1.0-cp310-abi3-manylinux_2_34_x86_64.whl`). ## Risk note This changes how the package installs (maturin, not setuptools) and adds Rust to the Python CI path — both verified locally as far as possible; watching the `python` + `wheels` CI jobs. PyPI *publish* automation (token-gated, on tag) is deferred to the release work (EMRY-057/M5).
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
femboy/emry!74
No description provided.