build icon indicating copy to clipboard operation
build copied to clipboard

--config-settings is not supported in build, but is the default for pip

Open lrq3000 opened this issue 2 years ago • 6 comments

Just a minor standardization issue: in pip the flag show in --help is --config-settings plural, with --config-setting singular being an alias, whereas in build only the singular form is supported, and the plural form causes an error.

I suggest that both tools should support both forms and should try to expose the same preferred form (either plural or singular).

lrq3000 avatar Apr 26 '23 21:04 lrq3000

Conceptually, it makes sense that it's in the singular, since you can only specify one setting per --config-setting. build also supports a short-form alias -C which is more ergonomic. I guess there's no harm in adding --config-settings as an additional alias - I guess pip provides both the singular and plural as a rule for multiple options?

layday avatar Apr 26 '23 21:04 layday

Originally, pip only supported --config-settings, and we only supported --config-setting - they added that to be compatible with us, I think. I think we are slightly more correct, but I'd rather have it work then be too strict about it (several versions of cibuildwheel were broken due to this inconstancy!). IMO I'd be fine to have the alias here. I think I'd like pip to recommend --config-setting in the help text, so across both libraries --config-settings is a legacy/compatibility fallback. You have to pass the flag for each setting, after all.

henryiii avatar Apr 26 '23 22:04 henryiii

FYI, Pip's latest version (23.1) supports -C as well. It avoids the strange double equals that the long form requires.

henryiii avatar Apr 26 '23 22:04 henryiii

I agree that it'd be better if pip were to use the singular in the help text. If the plural form should be considered legacy, I suppose I'd be a little more reluctant to adopt it - we'd basically be adopting pip's baggage.

layday avatar Apr 26 '23 22:04 layday

Thank you guys for your feedbacks! My voice should not matter but FWIW it also sounds more intuitive to me to be in the singular form because only a single flag can be passed at a time. The plural form is bound to induce users in error.

lrq3000 avatar Apr 26 '23 22:04 lrq3000

PS: so I think pip should also change the default advised form (singular instead of plural).

lrq3000 avatar Apr 26 '23 22:04 lrq3000

It's been nearly two years, so I suppose we're sticking with the singular :)

layday avatar Apr 03 '25 18:04 layday