Skip to content

Commit 2c0d6e3

Browse files
committed
Add documentation for CIBW_BEFORE_BUILD
1 parent 89c8735 commit 2c0d6e3

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

README.md

+14
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,20 @@ Space-separated list of dependencies required for running the tests.
132132
Example: `pytest`
133133
Example: `nose==1.3.7 moto==0.4.31`
134134
135+
| Environment variable: `CIBW_BEFORE_BUILD`
136+
| ---
137+
138+
Optional.
139+
140+
Shell command to run before building the wheel. This option allows you to run a command in **each** Python environment before the `pip wheel` command. This is useful if you need to set up some dependency so it's available during the build.
141+
142+
The active Python binary can be accessed using `{python}`, and pip with `{pip}`. These are useful when you need to write `python3` or `pip3` on a Python 3.x build.
143+
144+
Example: `{pip} install pybind11`
145+
146+
Platform-specific variants also available:
147+
`CIBW_BEFORE_BUILD_MACOS` | `CIBW_BEFORE_BUILD_WINDOWS` | `CIBW_BEFORE_BUILD_LINUX`
148+
135149
| Environment variable: `CIBW_SKIP` | 🔶 coming soon 🔶
136150
| --- | ---
137151

0 commit comments

Comments
 (0)