`pyproject.toml` doesn't support "per-platform" `before-build`
Description
:wave: Loving using this. Thanks y'all!
One thing I hit:
https://cibuildwheel.readthedocs.io/en/stable/options/#before-build lists "per-platform" env vars (e.g. CIBW_BEFORE_BUILD_MACOS), but trying:
[tool.cibuildwheel]
before-build-macos = "..."
I get
cibuildwheel.options.ConfigOptionError: "Option 'before-build-macos' not supported in a config file. Perhaps you meant 'before-build'?"
Build log
No response
CI config
No response
Either:
[tool.cibuildwheel.macos]
before-build = "..."
Or:
[tool.cibuildwheel]
macos.before-build = "..."
(Just two ways of writing the same thing in TOML).
With the newer overrides system, you could also mimic it:
[[tool.cibuildwheel.overrides]]
select = "*-macosx_*"
before-build = "..."
FANTASTIC!
Feel free to edit this issue (or close and I'll open a new one) to make this more obvious on the docs site.
Okay, we already have some mention of https://cibuildwheel.readthedocs.io/en/stable/options/#configuration-file. Do you have something in mind?
https://cibuildwheel.readthedocs.io/en/stable/options/#examples_10 the pyproject.toml tab doesn't match the "environment variables" tab (the latter having an example of "CIBW_BEFORE_BUILD_LINUX")