Skip to content

COMP: Replace deprecated pixi system-requirements with rich platforms - #317

Merged
hjmjohnson merged 1 commit into
InsightSoftwareConsortium:mainfrom
BRAINSia:pixi-platforms
Nov 26, 2026
Merged

hjmjohnson merged 1 commit into
InsightSoftwareConsortium:mainfrom
BRAINSia:pixi-platforms

Conversation

@hjmjohnson

Copy link
Copy Markdown
Member

Replace the deprecated [system-requirements] tables in pixi.toml with named platform entries carrying the same virtual packages, which removes the deprecation warning printed by every pixi command.
Merge danger: two-way door; blast radius: anyone running pixi older than 0.71.0, which cannot parse the new manifest (pixi self-update fixes it).

Shape of the change
 [workspace]
-platforms = ["linux-64", "linux-aarch64", "osx-arm64", "win-64"]
+platforms = ["linux-64", "linux-aarch64", "osx-arm64", "win-64",
+  { name = "linux-64-manylinux228", platform = "linux-64", glibc = "2.28", linux = "5.4" },
+  { name = "linux-aarch64-manylinux228", platform = "linux-aarch64", glibc = "2.28", linux = "5.4" },
+  { name = "osx-arm64-macos14", platform = "osx-arm64", macos = "14.0" }]

 [feature.manylinux228-build]
-platforms = ["linux-64", "linux-aarch64"]   + [system-requirements] linux 5.4, glibc 2.28
+platforms = ["linux-64-manylinux228", "linux-aarch64-manylinux228"]

 [feature.macosx-build]
-platforms = ["osx-arm64"]; system-requirements = { macos = "14.0" }
+platforms = ["osx-arm64-macos14"]

+[feature.host-platforms] / dev / publish: platforms = the four bare platforms
+[environments] default = ["host-platforms"]

Pinning the default, dev, and publish environments keeps them off the build variants, so pixi.lock changes only in platform names and no package is re-solved.

Evidence

Before, on every pixi command:

⚠ the `[system-requirements]` table is deprecated in favor of virtual
│ packages on `platforms`

After, with pixi 0.84.2:

  • pixi lock --check: up to date; no deprecation warning.
  • pixi install --locked -e macosx-py311: succeeds.
  • tests/test_target_platform.py reads the macOS deployment target from the platform entry; pytest tests/: 489 passed.
  • pre-commit run --all-files: passed.
  • Not tested: installing the manylinux environments (not installable on macOS); their locked solves are unchanged.

The platform syntax arrived in pixi 0.71.0 ("Rich platforms"). Older pixi fails loudly: expected a string, found table. The install scripts download the latest pixi but reuse a copy already present in their pixi directory, so a stale copy needs pixi self-update.

pixi 0.71.0 deprecated [system-requirements] in favor of virtual
packages on workspace platform entries, and every pixi command printed
the deprecation warning for manylinux228-build and macosx-build. Those
features now bind named platforms carrying the same virtual packages
(glibc 2.28 and linux 5.4; macos 14.0).

The default, dev, and publish environments are pinned to the four bare
platforms so they do not gain the build variants. pixi.lock changes
only in platform names: no package is added, removed, or re-solved.

The macOS deployment-target test reads the version from the platform
entry. pixi older than 0.71.0 cannot parse the new manifest
("expected a string, found table"); run pixi self-update.

pixi 0.84.2: lock --check up to date, no deprecation warning,
install --locked -e macosx-py311 succeeds; pytest tests/: 489 passed.

@dzenanz dzenanz left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good on a glance.

@hjmjohnson
hjmjohnson marked this pull request as ready for review November 26, 2026 02:01
@hjmjohnson
hjmjohnson merged commit f297140 into InsightSoftwareConsortium:main Nov 26, 2026
5 checks passed
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.

2 participants