Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Call for clarification: acceptable values for build-system.requires in pyproject.toml #6410
It's not clear nor is clearly specified by PEP518. But I was having a need to have an in-tree build back-end.
How to Reproduce
[build-system] requires = ["./build-aiohttp", ] build-backend = "build_aiohttp.api" # not yet supported, so it doesn't influence anything, it's for forward-compat: backend-path = "./build-aiohttp"
But if instead of
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
P.S. Oh and, by the way, I was able to test my other PEP517 backend outside of the project tree via
[build-system] requires = ["../fortunate_pkg"]
so this relative path feature proves to be quite useful for development/debugging purposes.
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 ;-)