-
Notifications
You must be signed in to change notification settings - Fork 238
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
[docs] Make shell interpreter explicit #1779
Comments
This is just In general, it's probably best to keep this simple and cross-platform, and then manually run a bash/bat/whatever script with complex commands if you need them. Or a Python script. :) |
Yeah, I had a hunch it would just be calling I think there's a few things that could help here:
Ultimately, it would be awesome to be able to specify the interpreter to allow something like: before-build = {
shell = "python",
script = 'import shutil; shutil.rm("{package}/bin")'
} Though I'm not sure if there's a desire for that, and it might complicate things significantly. |
You can do that today. Use before-build = [
"""python -c 'import shutil; shutil.rm("{package}/bin")'""",
] Same for bash, etc. Better yet, stick the contents in a file, stick before-build = [
"./tools/remove_bin.py",
] These are all cross platform and don’t depend on the shell Python uses. Also, your example was invalid TOML (though it will be valid in TOML 1.1 eventually). Inline tables must be one line in 1.0. :( |
(Not disagreeing with better docs, btw) |
Agreed on the docs. It's one of those things that was implied and never said. |
Summary
The docs should make it clear what shell is used when running commands such as
before-build
,before-all
,before-test
, etc.Motivation
cibuildwheel
allows for an arbitrary shell script to be executed in many places. The problem here is that it is unclear what shell is actually being used.Naively, I would expect that:
/bin/sh
or/bin/bash
./bin/zsh
as that is the default shell for macOS, though I would not be surprised if/bin/bash
was used for consistency with Linux.bash.exe
for consistency, or the nativecmd.exe
orpwsh.exe
.I would rather avoid the trial-and-error, and the docs should make it really clear what shell is used.
Build log
No response
CI config
No response
The text was updated successfully, but these errors were encountered: