feat: add platform override #5960
Merged
ruben-arts merged 6 commits intoprefix-dev:mainfrom Apr 29, 2026
Merged
Conversation
Contributor
|
Thanks for this! Lets just return a proper warning instead of panicking! |
Contributor
Author
Done! Now it raises a warning and falls back on the local platform. Thanks for your quick review |
ruben-arts
approved these changes
Apr 29, 2026
Contributor
ruben-arts
left a comment
There was a problem hiding this comment.
Added docs, looks good to me now.
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.
Description
Adds support for the
PIXI_OVERRIDE_PLATFORMenvironment variable, allowing users to install packages for a foreign architecture. It is useful for cross-compilation workflows where target dependencies need to be present on the host machine.As suggested in #5918, I went with an env var rather than a new CLI flag.
A few design choices worth mentioning:
Platform, pixi raises a warningpanics. Silently falling back to the host platform felt wrong since the user clearly has a different intention.Note: I'm not familiar with Rust at all, so feel free to point out if something can be improved!
Fixes #5918
How Has This Been Tested?
Added two unit tests:
test_best_platform_override_env_varandtest_best_platform_override_invalid_value.I also manually tested it on a
linux-64host by running:and verified the installed libraries are
aarch64.AI Disclosure
This PR doesn't contain AI-generated code.
Checklist:
schema/model.py.