Skip to content

feat: support config-settings#1244

Merged
henryiii merged 2 commits intopypa:mainfrom
henryiii:henryiii/feat/config-settings
Sep 6, 2022
Merged

feat: support config-settings#1244
henryiii merged 2 commits intopypa:mainfrom
henryiii:henryiii/feat/config-settings

Conversation

@henryiii
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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.

2 participants