Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: pip config options were broken #1430

Merged
merged 2 commits into from
Mar 11, 2023

Conversation

henryiii
Copy link
Contributor

Closes #1429. Only "build" backend supported config options, since pip uses a different name (with an s).

Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
Copy link
Contributor

@joerick joerick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for this! Looks good, I just had a suggestion on function params

@@ -208,9 +208,10 @@ def get_build_verbosity_extra_flags(level: int) -> list[str]:
return []


def split_config_settings(config_settings: str) -> list[str]:
def split_config_settings(config_settings: str, *, plural: bool) -> list[str]:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the 'plural' argument here is a little odd... Do you think it would be better to pass in the build backend instead (build or pip) and use that to decide the option name?

Copy link
Contributor Author

@henryiii henryiii Mar 10, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I started that way, but then went this way as I thought it was a little nicer than passing a string around. But I don't have a strong preference. If a third backend was added someday, I guess mypy would force handling the extra literal. I'd hope this goes away in the future when we can rely on the (not yet released) next version of pip, which supports -C, like build.

Edit: I think either way is fine, so I changed it.

Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
Copy link
Contributor

@joerick joerick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@joerick joerick merged commit 1d6ee75 into pypa:main Mar 11, 2023
@henryiii henryiii deleted the henryiii/fix/pipconfigopts branch March 11, 2023 14:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

--config-settings is passed as --config-setting
2 participants