-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Call for clarification: acceptable values for build-system.requires in pyproject.toml #6410
Comments
In-tree backend support was recently added to PEP 517. It's not yet supported in pip, however. |
Hi Paul, I do know that. My question is about whether it's legal to put a relative path in |
Ah, sorry, my misunderstanding. I don't believe so, PEP 518 states what can go in
So they aren't paths at all, and if pip is accepting paths, that's wrong. |
Here is where pip's validation logic is currently (it only checks that it's a list of strings): pip/src/pip/_internal/pyproject.py Lines 89 to 95 in 54b6a91
|
I'm inclined to describe this as "user error" - which is not to say that pip couldn't give better messages, but it's the user's responsibility to supply valid input. I don't really think we need to do full PEP 508 validation here. The odd sort-of-works result is probably because pip accepts more than just PEP 508 dependencies as "things to install", so this is arguably "behaviour undefined by the PEP that triggers an implementation defined result". The classic Undefined Behaviour nasal demons case ;-) |
Right, I'm just trying to decide whether to rely on it. Because, if it turns out broken in the next version, then it would affect already published sdists. |
I'm inclined to say let's actually abort in this edge case. I don't want people trying things they shouldn't and it sort-of working. |
Agreed, especially since this use case is covered by |
Environment
Description
It's not clear nor is clearly specified by PEP518. But I was having a need to have an in-tree build back-end.
So I've hacked it via installing with a relative path.
And it works!
Yet, @pradyunsg has pointed out that the way I used probably doesn't conform to PEP 508.
So I tried some other ways to point to the in-tree distribution. And those didn't work.
How to Reproduce
(this works)
But if instead of
"./build-aiohttp"
inrequires
I try any of"file://build-aiohttp"
,"file:///./build-aiohttp"
,"build_aiohttp @ file://./build-aiohttp"
,"build_aiohttp @ file:./build-aiohttp"
pip fails to recognize those as installables.Expected behavior
I don't know what to expect. The method which works seems to be undefined in PEPs so I probably shouldn't rely on it.
Pip may either decide to improve the filtering of
requires
option or document it being permissive...P.S. Oh and, by the way, I was able to test my other PEP517 backend outside of the project tree via
so this relative path feature proves to be quite useful for development/debugging purposes.
The text was updated successfully, but these errors were encountered: