feat: config settings placeholders (#2827)

* feat: config settings placeholders

Assisted-by: Copilot:GPT-5.4
Signed-off-by: Henry Schreiner <henryfs@princeton.edu>

* Update docs/options.md

Co-authored-by: agriya khetarpal <74401230+agriyakhetarpal@users.noreply.github.com>

---------

Signed-off-by: Henry Schreiner <henryfs@princeton.edu>
Co-authored-by: agriya khetarpal <74401230+agriyakhetarpal@users.noreply.github.com>
This commit is contained in:
Henry Schreiner
2026-05-09 14:11:40 -04:00
committed by GitHub
co-authored by agriya khetarpal
parent aed06ac94d
commit cbef1e8b89
9 changed files with 99 additions and 15 deletions
+11
View File
@@ -543,6 +543,9 @@ Specify config settings for the build backend. Each space separated
item will be passed via `--config-setting`. In TOML, you can specify
a table of items, including arrays.
You can use the `{project}` or `{package}` placeholders in `config-settings`
to refer to the project root or package being built, respectively.
!!! tip
Currently, "build" supports arrays for options, but "pip" only supports
single values.
@@ -566,6 +569,14 @@ Platform-specific environment variables also available:<br/>
CIBW_CONFIG_SETTINGS: "--build-option=--use-mypyc"
```
```yaml
CIBW_CONFIG_SETTINGS_LINUX: "setup-args=--cross-file={project}/cross_file.txt"
```
```yaml
CIBW_CONFIG_SETTINGS: "editable-verbose=true source-dir={package}"
```