Uploaded image for project: 'AI Platform Core Components'
  1. AI Platform Core Components
  2. AIPCC-11677

Onboard primp into the AIPCC Builder

    • False
    • Hide

      None

      Show
      None
    • 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

      Summary

      The build failed during the Rust dependency vendoring step for `primp`. The `cargo vendor` command could not resolve a local crate dependency referenced in the project's `Cargo.toml` lockfile.

      The 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)
      

      What Went Wrong

      `primp` is a Python package with a Rust extension (built via `maturin` or similar). Its workspace includes a local crate called `primp-h2` located at `crates/primp-h2/`. The `Cargo.toml` manifest for `crates/primp-python` references this local `h2` dependency via a path dependency.

      The `primp-h2` crate directory is missing from the published sdist (`primp-1.1.2.tar.gz`). The sdist was packaged without including all the necessary local crates in the Cargo workspace. When `fromager` runs `cargo vendor` to vendor Rust dependencies, Cargo tries to resolve the lockfile, finds the path dependency to `crates/primp-h2`, and fails because that directory doesn't exist in the extracted source.

      How to Fix

      • Upstream fix (preferred): The `primp` maintainers need to ensure that all local workspace crates (including `crates/primp-h2/`) are included in the sdist. This is typically controlled by the `include` directive in `pyproject.toml` or `Cargo.toml`'s `[package]` section. The sdist should contain the complete Cargo workspace.
      • Version change: Check if a newer version of `primp` has fixed the sdist packaging. The missing crate in the tarball may have been an oversight in version 1.1.2 specifically.
      • Fromager override: If an upstream fix isn't available, a `prepare-source` override script could be added to reconstruct the missing crate from the Git repository at the correct tag before the `cargo vendor` step runs.

      Packaging Analysis Summary

      `primp` v1.1.2 is a Rust-backed Python HTTP client that builds successfully on x86_64 using maturin/PyO3 with zero runtime Python dependencies and a permissive *MIT license* fully compatible with Red Hat redistribution. The key build consideration is that it *must be built from the full Git repository* (not the PyPI sdist) because it relies on a Cargo workspace with four forked Rust crates patched via `[patch.crates-io]`, which the sdist doesn't properly preserve. *Next step*: clone the v1.1.2 tag, ensure Rust stable (>=1.70), gcc, and cmake are available, then run `maturin build --release` from `crates/primp-python/` to produce the wheel.

              epacific@redhat.com Einat Pacifici
              aipcc-jira-bot@redhat.com AIPCC JIRABOT
              Frank's Team
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated: