EMRY-068: ship the emry CLI in the wheel #120

Merged
vxfemboy merged 1 commit from emry-cli-in-wheel into main 2026-07-19 05:32:44 +00:00
vxfemboy commented 2026-07-19 05:26:08 +00:00 (Migrated from github.com)

Problem

The 0.2.0 wheel shipped only the SDK + emry._native extension. The emry command is a Rust binary (emry-cli) that maturin never bundled, and there was no console script — so pip install emry gave no emry watch/web/compare/export, and the SDK's live dashboard (which launches emry) silently degraded.

Fix (ruff/uv-style bundling)

  • scripts/build-cli.sh compiles emry into python/emry/_bin/ at wheel-build time; [tool.maturin] include bundles it (wheel only — the sdist rebuilds from source).
  • Console script emry = emry._cli:main + python -m emry: the shim execs the bundled binary.
  • live.py resolves the bundled binary directly (works even when the venv bin/ isn't on PATH; falls back to emry on PATH for source installs).
  • run(name=...) alias for the positional run name (papercut #3).
  • CI wheels job builds the CLI and verifies emry --version + python -m emry from a clean --no-index install — so the bundling is proven on every PR.
  • Release builds the binary inside the manylinux_2_28 container (cmake+perl for rustls/aws-lc-rs) so the bundled binary matches the wheel's glibc floor.
  • Bumped to 0.2.1.

Verified locally: built the wheel, installed into a clean venv, emry --versionemry 0.2.1, python -m emry runs --help works, SDK imports, name= alias + both/neither error paths correct. Python coverage 94.4%.

Closes #119

## Problem The 0.2.0 wheel shipped only the SDK + `emry._native` extension. The `emry` command is a **Rust binary** (`emry-cli`) that maturin never bundled, and there was no console script — so `pip install emry` gave no `emry watch/web/compare/export`, and the SDK's live dashboard (which launches `emry`) silently degraded. ## Fix (ruff/uv-style bundling) - `scripts/build-cli.sh` compiles `emry` into `python/emry/_bin/` at wheel-build time; `[tool.maturin] include` bundles it (wheel only — the sdist rebuilds from source). - Console script `emry = emry._cli:main` + `python -m emry`: the shim execs the bundled binary. - `live.py` resolves the bundled binary directly (works even when the venv `bin/` isn't on PATH; falls back to `emry` on PATH for source installs). - `run(name=...)` alias for the positional run name (papercut #3). - **CI `wheels` job** builds the CLI and verifies `emry --version` + `python -m emry` from a clean `--no-index` install — so the bundling is proven on every PR. - **Release** builds the binary inside the `manylinux_2_28` container (cmake+perl for rustls/aws-lc-rs) so the bundled binary matches the wheel's glibc floor. - Bumped to **0.2.1**. Verified locally: built the wheel, installed into a clean venv, `emry --version` → `emry 0.2.1`, `python -m emry runs --help` works, SDK imports, `name=` alias + both/neither error paths correct. Python coverage 94.4%. Closes #119
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!120
No description provided.