Bundle the gen CLI client in the Python wheel - #226
Open
bobvh wants to merge 3 commits into
Open
Conversation
Stage the release Rust binary into maturin's wheel data scripts directory so pip, uv, and pipx installs put `gen` on PATH alongside the Python bindings. Adds a verify_wheel.py check and a smoke test that installs the built wheel and runs `gen --version` in CI.
…tion Points at bobvh/rusqdoltlite@d1ef39b (fix-windows branch), which excludes Windows from the bundled remote-auth server build to avoid the pthread_t/struct DoltliteServer parse failure under MSVC. Without this, cargo build --bin gen fails on Windows because default features enable "remote". Revert this patch once the fix ships in a published crates.io release.
Resolves a yanked-crate warning surfaced by cargo-deny.
Chris7
reviewed
Jul 31, 2026
| with: | ||
| command: build | ||
| args: --release --manifest-path gen-python/Cargo.toml --features extension-module --interpreter python${{ matrix.python-version }} --out gen-python/target/wheels | ||
| sccache: true |
| working-directory: . | ||
| - name: Verify wheel contents (macOS, Linux) | ||
| if: runner.os != 'Windows' | ||
| run: python gen-python/scripts/verify_wheel.py gen-python/target/wheels/*.whl |
Member
There was a problem hiding this comment.
i don't really get the point of a verify_wheel script, what are we trying to keep track of?
| @@ -0,0 +1,47 @@ | |||
| #!/usr/bin/env python3 | |||
| """Verify that a Gen wheel contains the Python package and bundled client.""" | |||
Member
There was a problem hiding this comment.
this doesn't really do a meaningful test. It's like validating a mock you wrote. Meaningful test is verifying it installs + is importable + is a callable binary.
| @[ -d .venv ] || python -m venv .venv | ||
| @.venv/bin/pip show maturin >/dev/null 2>&1 || .venv/bin/pip install maturin | ||
| .venv/bin/maturin develop --release --manifest-path gen-python/Cargo.toml --features extension-module | ||
| stage-python-client: |
Member
There was a problem hiding this comment.
why is it called stage-python-client?
|
|
||
| ## Install | ||
|
|
||
| **Gen client**: prebuilt binaries for macOS and Linux are on the [releases page](https://github.com/genhub-bio/gen/releases): [macOS (.pkg)](https://github.com/genhub-bio/gen/releases/download/nightly/gen.macos.pkg), [Linux x86_64 (.zip)](https://github.com/genhub-bio/gen/releases/download/nightly/gen.linux-x86_64.zip), [Linux arm64 (.zip)](https://github.com/genhub-bio/gen/releases/download/nightly/gen.linux-arm64.zip). Gen is built primarily for Unix-like systems; on Windows, you can install [WSL](https://learn.microsoft.com/en-us/windows/wsl/) to get a Linux environment, then use the Linux binary above from inside it. |
Member
There was a problem hiding this comment.
i'd prefer to keep the binary stuff at the top -- imo that's the easiest way to install
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stages the release Rust binary into maturin's wheel data
scriptsdirectory sopip,uv, andpipxinstalls putgenon PATH alongside the Python bindings.make stage-python-clientbuilds the binary and copies it intogen.gen.data/scripts/gen-python/scripts/verify_wheel.pychecks the built wheel contains the client, the compiled extension, and the Jupyter widget assetgen --versionas a smoke testmake python-wheeltargetAlso includes a temporary
[patch.crates-io]pin ofrusqdoltliteto an unpublished fix-windows branch (bobvh/rusqdoltlite@d1ef39b) — without it,cargo build --bin genfails on Windows under MSVC (pthread_t/DoltliteServerparse failure in the bundled remote-auth server). Revert once the fix ships on crates.io.Also bumps
spinto 0.9.9 to resolve a yanked-crate warning from cargo-deny.Stacked PR 1/5: pip-client → pip-abi3 → pip-targets → pip-publish-gating → pip-apple-signing