Skip to content

Commit 01265e5

Browse files
Clarify shell used for command options (#2904)
1 parent f4afd95 commit 01265e5

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

docs/options.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -734,6 +734,17 @@ The placeholder `{package}` can be used here; it will be replaced by the path to
734734

735735
On Windows and macOS, the version of Python available inside `before-all` is whatever is available on the host machine. On Linux, a modern Python version is available on PATH.
736736

737+
!!! note "Shell selection"
738+
739+
Shell command options such as `before-all`, `before-build`,
740+
`repair-wheel-command`, and `before-test` are executed by a platform shell.
741+
Linux builds run inside the build container and invoke the container's `sh -c`.
742+
On macOS and Windows, cibuildwheel calls Python's
743+
`subprocess.run(..., shell=True)`, which normally means `/bin/sh` on macOS
744+
and `cmd.exe` on Windows. If you need a specific interpreter, invoke it
745+
explicitly, for example `python scripts/prepare.py` or
746+
`bash scripts/prepare.sh`.
747+
737748
This option has special behavior in the overrides section in `pyproject.toml`.
738749
On linux, overriding it triggers a new container launch. It cannot be overridden
739750
on macOS and Windows.

0 commit comments

Comments
 (0)