-
Notifications
You must be signed in to change notification settings - Fork 246
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
sh: No such file or directory
in before_all
for linux builds with cibuildwheel v2.10.0
#1271
Comments
The host |
@joerick two easy options: We could call We could remove the quoting, and just trust users not to produce malformed input. It wasn't supported before 2.10 anyway. A final "option" that I'm not calling an option would be to restructure this so it is not passed through as strings, but is passed through as a dict (making the toml version the "true" method and strings just a way to build that dict). But this is a larger architectural change. Quick example: >>> shlex.quote("$HOME")
"'$HOME'" This is quoted on the host, but needs to be expanded on the target. |
I wonder if this is related to why scikit-build/cmake-python-distributions#282 is breaking. I don't see an expansion, but maybe the quoting is not working as expected: https://github.com/scikit-build/cmake-python-distributions/blob/d8404ad6bcb294f2b95b0ceba26c9b35d248706f/pyproject.toml#L42 The only thing unique to that pair of jobs is the part: |
Ah. Hmm. So it seems to be that the problem is that unlike the config-settings option, we're not calling |
Could we call |
I think we can't - we can't call |
So, let's think what we want...
Though 3 might not be a huge priority... I'm not even sure I care about 4. much, tbh. |
One idea I had was, when parsing the option from TOML, we could run |
☝️ I think this might be a good approach - it gives users the most control - if they specify one token (i.e. get their bash quoting right) then cibuildwheel doesn't touch it. Only if the option value would form an invalid bash assignment do things get quoted. We could raise a warning in this case, too?
|
@henryiii and I have just been chatting on Discord. There is some concern that my proposed fix above would make the quoting behaviour even more confusing than it was before (which I kinda agree with!) Based on @henryiii's build logs above, it also seems like there's might be an incompatibility between shlex and bashlex somewhere-
We don't actually use bashlex.split anywhere though, so maybe it's not actually a problem. Needs more investigation!
I think this is only papering over the problem... correct quoting is also required for the bash parser to do command substitution with
Yeah, this is what I'm leaning towards, at least temporarily.
Perhaps. Though we'd still have to figure out the tricky problem of how to translate between a dict and a bash string of assignments somewhere e.g. how do we reconcile this:
So I'm kinda leaning towards reverting to the previous behaviour for now, until we can figure out what the right policy is here. |
Fix for #1803, where the method used for merging the config-settings option - string concatenation - was of little use. I broke out the TableFmt object into a protocol-like object called OptionFormat, where the formatting and merge rules can be customised more deeply. This is more explicit, and lets us be a bit more precise with how TOML object get converted into the options. I intend to use the flexibility of the OptionsFormat structure to tackle the remaining abiguity around environment variable quoting, as seen in the xfails in the options_test.py unit test and discussed in #1271. Co-authored-by: Matthieu Darbois <mayeut@users.noreply.github.com>
Description
After updating from
2.9.0
tov2.10.0
, I get the following error for linux builds using a simplebefore-all
command likebefore-all = "ls"
:This seems to be related to the fact that we're updating the
PATH
environment variable:The text was updated successfully, but these errors were encountered: