Skip to content

fix: Handle CONDA_OVERRIDE_* in pixi global install#6335

Open
hunger wants to merge 6 commits into
prefix-dev:mainfrom
hunger:push-ruoslnwqkzvl
Open

fix: Handle CONDA_OVERRIDE_* in pixi global install#6335
hunger wants to merge 6 commits into
prefix-dev:mainfrom
hunger:push-ruoslnwqkzvl

Conversation

@hunger

@hunger hunger commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

This is a counter proposal to PR #6325

Fixes: #6323

@hunger

hunger commented Jun 10, 2026

Copy link
Copy Markdown
Contributor Author

The more I think about it: I should store a conda-meta/pixi file with resolved platform and minimal platform, just like I do for "local" environments. That is inherently environment specific information. I'll change this.

hunger and others added 6 commits June 11, 2026 11:09
Make pixi_platform_to_toml_value public and re-export it, TomlPixiPlatform,
and is_subdir_default from pixi_manifest so pixi_global can parse, serialize
and edit rich platforms in its manifest.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Add virtual_packages_from_env_overrides, returning the virtual packages
defined purely by the CONDA_OVERRIDE_* environment variables currently set.
pixi global uses it to record an explicit override as a declared virtual
package.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
An environment's platform key may now be a rich platform, e.g.
{ platform = "linux-64", cuda = "12.0" }, in addition to a bare subdir
string; both round-trip. Add Manifest::add_platform_virtual_packages to
record virtual packages onto an environment's platform.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…RIDE_*

Solve a global environment against the machine's auto-detected virtual
packages with the platform's recorded overrides layered on top. Persist
CONDA_OVERRIDE_* set during 'pixi global install' onto the environment's
platform so later 'pixi global update'/'sync' reuse them without the variable
having to be set again.

Fixes prefix-dev#6323.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Document rich platform entries in pixi-global.toml and how CONDA_OVERRIDE_*
values are recorded onto an environment's platform.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…CONDA_OVERRIDE_*

Solve pixi global environments against machine-detected virtual packages
that honor CONDA_OVERRIDE_* (e.g. CONDA_OVERRIDE_CUDA=12.0), so run
constraints on virtual packages are respected (fixes the install-ignores-
__cuda bug). Record the resolved platform (subdir + solve virtual packages)
and the minimum-supported platform (subdir + only the virtual packages some
installed record depends on) in the environment's conda-meta/pixi marker,
reusing the EnvironmentFile, PlatformData and minimal-platform code shared
with non-global environments.

Revert the rich-platform-in-manifest approach: the pixi-global.toml platform
field stores a bare subdir again, and the manifest helper exports widened for
it are restored.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@hunger hunger force-pushed the push-ruoslnwqkzvl branch from 4a7ef48 to 030f755 Compare June 11, 2026 11:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

pixi ignoring run constraints on virtual packages

1 participant