pypa / build

A simple, correct Python build frontend
https://build.pypa.io
MIT License
731 stars 121 forks source link

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

Open lrq3000 opened 1 year ago

lrq3000 commented 1 year ago

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).

layday commented 1 year ago

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?

henryiii commented 1 year ago

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 commented 1 year ago

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

layday commented 1 year ago

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.

lrq3000 commented 1 year ago

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 commented 1 year ago

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