Hi all. As some of you may know, PEP 517 allows us to pass a
config_settings parameter to build hooks. Pre PEP 517, we were able to do
python setup.py --help to see which extra configuration options the backend supports. Right now, the same is not possible because PEP 517 frontends do not have any information.
How do you feel about possibly adding an optional hook to query the backend for usage information? I was envisioning some like
def get_usage_for_build_sdist() -> Dict[str, str]: ...
The hook would return a dictionary containing entry keys and the usage description.
As one of the use-cases of this option is to be used by users in the terminal, I believe it would be very valuable to also have usage information available.
Currently, PEP 517 frontends are limited to their own help information, forcing the users to refer to backend documentation, which is generally distributed separately, to find out about this usage information.
A PEP 517 frontend implementation could look something like:
$ python -m build --help-wheel universal When this option is given, my-super-cool-backend builds a wheel compatible with Python 2 and 3. ...
What do you think? Do you have any alternative suggestions that I perhaps have not considered? Do you see any drawbacks with this approach I am missing? Let me know.