Closed

Description
Description
The doc said:
The user can supply configuration settings using the
--config-settings
command line option (which can be supplied multiple times, in order to specify multiple settings).
If setting multiple times like this:
pip wheel --config-settings="--build-option=--cffi" --config-settings="--build-option=--avx2" -v .
Only the last option is passed to backend: {'--build-option': '--avx2'}
It seems these code let the last option override the previous options:
pip/src/pip/_internal/cli/cmdoptions.py
Lines 803 to 806 in c987c68
Expected behavior
All options are passed to backend: {'--build-option': ['--cffi', '--avx2']}
Modify the code like this:
if dest is None:
dest = {key: []}
setattr(parser.values, option.dest, dest)
dest[key].append(val)
pip version
22.3.1
Python version
3.10
OS
Windows 11
How to Reproduce
- define a custom PEP-517 hook
get_requires_for_build_wheel
- let the hook print the
config_settings
argument
def get_requires_for_build_wheel(config_settings=None):
print('config_settings argument:', config_settings)
return []
Output
No response
Code of Conduct
- I agree to follow the PSF Code of Conduct.