Skip to content

Builds run cargo metadata for all platforms #610

Description

@WhyNotHugo

Builds run cargo metadata --manifest-path Cargo.toml without a --target argument. This requires fetching metadata for all platforms.

Downstream (at least on Alpine) builds use the pattern:

# In the source-fetching stage
cargo fetch --locked

# In the build phase
export CARGO_NET_OFFLINE=true
gpep517 build-wheel --wheel-dir .dist …

The above separates fetching sources and compiling the package with those pre-fetched sources.

This fails for packages with py3-setuptools-rust, because it executes cargo metadata which, by default, wants metadata for packages for all targets.

I believe only the current target should be fetched instead (e.g.: rustc --print host-tuple).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions