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

feat: support config-settings #1244

Merged
merged 2 commits into from Sep 6, 2022

Conversation

henryiii
Copy link
Contributor

@henryiii henryiii commented Aug 23, 2022

Addresses #1227. Don't have much for tests yet, open to ideas.

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

feat: support config-settings

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

joerick commented Aug 30, 2022

This looks good to me! Only thing I'm wondering about is, since the values use double-quotes and shlex.split, what happens with a config like this:

[tool.cibuildwheel.config-settings]
example = "a string with \"some quotes\" in it"

I don't know if that works, but... maybe that's an evil/unrealistic input, so if it's awkward to support we could just raise an error when a config-settings value has a double-quote in it (and request the user raise an issue on the tracker).

@henryiii
Copy link
Contributor Author

Would it be better to use shlex.quote? _inner_fmt could provide the quoted value too, as quoted_v or something.

@joerick
Copy link
Contributor

joerick commented Aug 31, 2022

Yeah I think shlex.quote would work better. I think that shlex.split and shlex.quote should roundtrip perfectly.

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.

Oh nice. I hadn't realised the shlex.quote fix would apply to environment too.

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.

None yet

2 participants