Skip to content
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: Address some confusion around the CIBW_ENVIRONMENT option. #1667

Merged
merged 2 commits into from
Dec 6, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions docs/options.md
Original file line number Diff line number Diff line change
Expand Up @@ -587,11 +587,11 @@ Platform-specific environment variables also available:<br/>


### `CIBW_ENVIRONMENT` {: #environment}
> Set environment variables needed during the build
> Set environment variables

A list of environment variables to set during the build. Bash syntax should be used, even on Windows.
A list of environment variables to set during the build and test phases. Bash syntax should be used, even on Windows.

You must set this variable to pass variables to Linux builds (since they execute in a container). It also works for the other platforms.
You must use this variable to pass variables to Linux builds, since they execute in a container. It also works for the other platforms.

You can use `$PATH` syntax to insert other variables, or the `$(pwd)` syntax to insert the output of other shell commands.

Expand Down Expand Up @@ -673,10 +673,13 @@ Platform-specific environment variables are also available:<br/>
!!! note
cibuildwheel always defines the environment variable `CIBUILDWHEEL=1`. This can be useful for [building wheels with optional extensions](faq.md#building-packages-with-optional-c-extensions).

!!! note
To do its work, cibuildwheel internally sets the options `PIP_CONSTRAINT`, `VIRTUALENV_PIP`, `DIST_EXTRA_CONFIG`, `SETUPTOOLS_EXT_SUFFIX`, `PIP_DISABLE_PIP_VERSION_CHECK`, `PIP_ROOT_USER_ACTION`. Your assignments to these options might be overridden.

### `CIBW_ENVIRONMENT_PASS_LINUX` {: #environment-pass}
> Set environment variables on the host to pass-through to the container during the build.
> Set environment variables on the host to pass-through to the container.

A list of environment variables to pass into the linux container during the build. It has no effect on the other platforms, which can already access all environment variables directly.
A list of environment variables to pass into the linux container during each build and test. It has no effect on the other platforms, which can already access all environment variables directly.

To specify more than one environment variable, separate the variable names by spaces.

Expand Down