-
Story
-
Resolution: Unresolved
-
Undefined
-
None
-
None
-
False
-
-
False
-
-
Package 'primp' does not build as-is via the AIPCC self-service pipeline and requires builder repository onboarding.
Build Failure Summary
Root Cause Analysis: `primp==1.1.2` Build Failure
What Happened
The build failed during the Rust dependency vendoring step for `primp==1.1.2`. The `cargo vendor` command could not complete because the source distribution (sdist) is missing an internal crate that the project depends on.
Key Error
error: failed to sync Caused by: failed to load lockfile for /mnt/work-dir/primp-1.1.2/primp-1.1.2 Caused by: failed to load source for dependency `h2` Caused by: Unable to update /mnt/work-dir/primp-1.1.2/primp-1.1.2/crates/primp-h2 Caused by: failed to read `/mnt/work-dir/primp-1.1.2/primp-1.1.2/crates/primp-h2/Cargo.toml` Caused by: No such file or directory (os error 2)
Root Cause
The `primp` project uses a Cargo workspace with local path dependencies. The `Cargo.toml` for the `primp-python` crate references a sibling crate called `primp-h2` (at `crates/primp-h2`), but this crate directory is not included in the published sdist (`primp-1.1.2.tar.gz`).
This means:
- The `Cargo.lock` references `h2` as a local path dependency pointing to `crates/primp-h2`
- When `cargo vendor` tries to resolve all dependencies, it follows the lockfile and attempts to read `crates/primp-h2/Cargo.toml`
- That path does not exist in the extracted source archive, causing the failure
How to Fix
1. Report upstream: File an issue with the `primp` project requesting that the sdist include all workspace crates (specifically `crates/primp-h2`). The project's sdist packaging configuration (likely in `pyproject.toml` or `MANIFEST.in`) needs to be updated to include the full `crates/` directory.
2. Check for a newer version: A newer release of `primp` may have fixed the sdist packaging to include the missing crate. Check if a version newer than `1.1.2` is available and whether it resolves this issue.
3. Patch the sdist: As a workaround, create an override that clones the full `primp` source repository (which would include `crates/primp-h2`) and builds from that instead of the incomplete PyPI sdist. This could be done via a `prepare-source` hook or a custom sdist that includes all necessary files.
Packaging Analysis Summary
primp 1.1.2 is a *Rust-backed* Python HTTP client (complexity 8/10) that compiles via PyO3/maturin into a single `.so` with *zero Python runtime dependencies; it requires Rust, CMake, and a C/C++ compiler to build, and **must be built from the full Git repository* (not sdist) due to workspace-level `[patch.crates-io]` directives that redirect to internal forks of hyper, rustls, and h2. All licenses (MIT/Apache-2.0/ISC) are fully compatible with Red Hat redistribution, and the recommended approach is a source build from the v1.1.2 Git tag with vendored Rust dependencies for reproducibility, noting that fat LTO will result in 10-30 minute compile times.
- blocks
-
AIPCC-11678 Add primp into the RHAI pipeline onboarding collection
-
- In Progress
-
- mentioned on