Skip to content

Conversation

henryiii
Copy link
Contributor

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

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



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.

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