pixi icon indicating copy to clipboard operation
pixi copied to clipboard

feat: Relative path support in LockFile

Open hunger opened this issue 2 months ago • 3 comments

Description

Make pixi handle relative paths to pypi dependencies in the LockFile. This helps when checking in pixi.lock files that reference local python packages. Instead of ending up with a machine specific path in the lock file we have a relative path that should work for all developers.

This depends on the rattler part which is here: https://github.com/conda/rattler/pull/1760

The PR consists of several changes:

  • Update to the rattler_lock API changes made in conda/rattler#1760
  • Make sure the non-pep508-extensions are enabled in pixi as well
  • Convert between uv relative paths and pixi relative paths

Note: This only works with pixi.log, not when storing the pixi configuration inline in pyproject.toml. Pyproject.toml will need to get an update to enable it to handle relative paths (like accept a work directory when parsing the file as well as non-pep508-extension support). I did not want to complicate this PR by requiring another PR to yet another crate.

Relates to: #4680

hunger avatar Oct 19 '25 12:10 hunger

CI fails right now since rattler_lock does not have the required version.

hunger avatar Oct 19 '25 15:10 hunger

Updated the change about adapting to rattler API changes.

hunger avatar Oct 20 '25 16:10 hunger

Maybe we can patch the rattler versions in this PR? So we can see if CI runs and then change it back after a rattler release?

tdejager avatar Oct 22 '25 08:10 tdejager