Skip to content

fix: fix for using file::// in pyproject.toml dependencies#1196

Merged
ruben-arts merged 1 commit intoprefix-dev:mainfrom
tdejager:fix/direct-url-and-locking
Apr 16, 2024
Merged

fix: fix for using file::// in pyproject.toml dependencies#1196
ruben-arts merged 1 commit intoprefix-dev:mainfrom
tdejager:fix/direct-url-and-locking

Conversation

@tdejager
Copy link
Copy Markdown
Contributor

Should fix: #1186

This adds some special case logic for when file:// are found as requirements. As well as has some special logic when uv returns the file:// as a given. Which is needed because we do not know whether uv builds the local editable or our specified requirement first. In which cases it gives a different given than we would expect.

@tdejager
Copy link
Copy Markdown
Contributor Author

@ruben-arts I could add an example as a test for it if you want but it's bound to be a bit contrived. Let me know what you think, manual testing indicates this solves the original issue.

@ruben-arts
Copy link
Copy Markdown
Contributor

I would love to see it in an example! Nice docstring BTW!

@tdejager
Copy link
Copy Markdown
Contributor Author

Hmm, now that I'm trying it is impossible to make an example that works in CI because pep508 only accepts absolute paths. There are some non-pep508 extension that enable this, but this is unsupported, by the: https://github.com/PyO3/pyproject-toml-rs

@ruben-arts
Copy link
Copy Markdown
Contributor

Is that where this is coming from: #1186 (comment) ?

@tdejager
Copy link
Copy Markdown
Contributor Author

tdejager commented Apr 16, 2024

Is that where this is coming from: #1186 (comment) ?

Edit: Ah I misread, yes that error is because of the comment above indeed. And also makes creating a example difficult.

However, this fix has little do to with it. From the user-experience side it might seem similar but the fix is going to be very different. This is just for correctly supporting absolute file url's in the pyproject.toml dependency section.

@ruben-arts ruben-arts merged commit 64210ff into prefix-dev:main Apr 16, 2024
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.

Panic when installing package with pkg @ file:///path/to/local/pkg dependency

2 participants