Description
People seem to regularly expect this library to be a higher-level tool than it is. As a result, we get requests for functionality that we don't want to support, and users are disappointed that features that do exist don't meet their expectations.
I suggest that this library should be reorganised, and potentially split up, to better reflect different features.
- A very low-level library, that has no external dependencies, that just handles calling backend hooks. Essentially, this would just be the wrappers.py file and support modules.
- A slightly higher level library that depends on a particular toml library, and parses
pyproject.toml
and calls the backend. It should probably also return the build dependencies. I'm not 100% sure this is useful, but it would satisfy the needs of people wanting to manage dependencies themselves, but still be able to call something that does all the steps of building a project - see for example Don't pip install without user knowledge and allow to opt out #81. - Maybe a build environment management library - but my feeling is that getting such a thing right is pretty complex. I'd be inclined to say that if we were to provide a library interface to build environment management, it should be based on pip's implementation, not on the existing code.
- A command line tool doing what is currently
pep517.build
, etc. Personally, this isn't something I particularly want to touch, but the growing popularity ofpep517.build
suggests that there's a demand for this.
I'd suggest that this project focus on being a pure library, covering (1) and (2) initially, with (3) a longer-term goal.
The command line functionality can be spun off into an independent project. I'd argue that the current build environment management code should probably go with it - it's not really robust enough to be a usable library at the moment, but it's needed for the command line tools.