Call for clarification: acceptable values for build-system.requires in pyproject.toml
See original GitHub issueEnvironment
- pip version: 19.0.3
- Python version: 3.7
- OS: GNU/Linux
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)
[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 "./build-aiohttp"
in requires
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
[build-system]
requires = ["../fortunate_pkg"]
so this relative path feature proves to be quite useful for development/debugging purposes.
Issue Analytics
- State:
- Created 4 years ago
- Comments:9 (9 by maintainers)
Top GitHub Comments
Agreed, especially since this use case is covered by
intreehooks
and (soon)backend-path
.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.