Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[pixi-build] Inject system-requirements as c_stdlib variants #6175

@ruben-arts

Description

@ruben-arts

When using the pixi-build-python backend for building rust packages with Maturin, you might end up with Maturin building a ....-macosx_26_0_arm64.whl wheel. But this is not a wheel that is build for you system.

Pixi should automatically inject these build variants based on the system-requirements that your workspace has set, or default to the default system-requirements.

conda-forge and uv also default to 11.0.

Workaround

A workaround right now is to set the build-variants:

[workspace]
build-variants = { c_stdlib = ["macosx_deployment_target"], c_stdlib_version = ["11.0"] }

Potenial error

Adding this for searchability reference.

When using the uv installer to build your python package you might see a similar error to this:

 │ │ DEBUG Built `particle-rs @ file:///Users/dev/pixi/examples/pixi-build/polyglot-particles/particle_rs` into `particle_rs-0.1.0-cp314-cp314-macosx_
 │ │ 26_0_arm64.whl`
 │ │       Built particle-rs @ file:///Users/dev/pixi/examples/pixi-build/polyglot-particles/particle_rs
 │ │ TRACE Released lock at `$SRC_DIR/.cache/uv/sdists-v9/editable/a98d6922f6474c71/.lock`
 │ │   × Failed to build `particle-rs @
 │ │   │ file:///Users/dev/pixi/examples/pixi-build/polyglot-particles/particle_rs`
 │ │   ╰─▶ The built wheel `particle_rs-0.1.0-cp314-cp314-macosx_26_0_arm64.whl` is
 │ │       not compatible with the current Python 3.14 on macOS aarch64

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions