Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pixi pep508 file scheme does not support relative paths #2802

Open
2 tasks done
rmorshea opened this issue Jan 2, 2025 · 0 comments
Open
2 tasks done

Pixi pep508 file scheme does not support relative paths #2802

rmorshea opened this issue Jan 2, 2025 · 0 comments

Comments

@rmorshea
Copy link

rmorshea commented Jan 2, 2025

Checks

  • I have checked that this issue has not already been reported.

  • I have confirmed this bug exists on the latest version of pixi, using pixi --version.

Reproducible example

Create a Python project with a dependency like

[project]
dependencies = ["my-package@file://./path/to/my-package-0.0.1-py3-none-any.whl"]

Running pixi i yields

  × Unsupported pep508 requirement: 'my-package@file://./path/to/my-package-0.0.1-py3-none-any.whl'
  ╰─▶ could not convert './path/to/my-package-0.0.1-py3-none-any.whl' to a file path

If I convert this to an absolute, rather than relative path installation succeeds.

[project]
dependencies = ["my-package@file:///absolute/path/to/my-package-0.0.1-py3-none-any.whl"]

This likely is resulting from an error in url.to_file_path.

Issue description

Pixi's method for converting pep508 file paths to requirements does not support relative paths.

Expected behavior

Pixi should be able to install packages via relative paths. This is currently an issue with pip but other tools have workarounds for the limitations in the pep508 spec. For example, Hatch has contextual formatting.

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

No branches or pull requests

1 participant