-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Closed
Labels
PEP implementationInvolves some PEPInvolves some PEPstate: awaiting PRFeature discussed, PR is neededFeature discussed, PR is neededtype: bugA confirmed bug or unintended behaviorA confirmed bug or unintended behavior
Description
Description
The doc said:
The user can supply configuration settings using the
--config-settingscommand 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
| if dest is None: | |
| dest = {} | |
| setattr(parser.values, option.dest, dest) | |
| dest[key] = val |
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_settingsargument
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.
Metadata
Metadata
Assignees
Labels
PEP implementationInvolves some PEPInvolves some PEPstate: awaiting PRFeature discussed, PR is neededFeature discussed, PR is neededtype: bugA confirmed bug or unintended behaviorA confirmed bug or unintended behavior