Add a UI to set config settings for PEP 517 backends by pfmoore 路 Pull Request #11059 路 pypa/pip (original) (raw)

From PEP 517, "Build frontends SHOULD provide some mechanism for users to specify arbitrary string-key/string-value pairs to be placed in this dictionary." You could parse the string value passed for global_option in setuptools (split on whitespace or commas, parse arbitrary JSON). I considered having a way to accepting arbitrary JSON for config_settings, but decided it was over-complex for the user (correctly quoting arbitrary JSON in the shell is messy, and depends heavily on the shell...) as well as going beyond what PEP 517 suggested.

Alternatively, a PR to add an option for this would be considered. The hard part (IMO) is designing a reasonable UI.

As a final note, pip's legacy --global-option flag is never passed to setuptools in the case of pyproject-based builds, so I can guarantee you that no pip user is currently using the ability to pass a list of values via config_settings 馃檪