Skip to main content
Version: 2.23 (prerelease)

environments-preview


A highly experimental subsystem to allow setting environment variables and executable search paths for different environments, e.g. macOS vs. Linux.

Backend: pants.core

Config section: [environments-preview]

Basic options

names

--environments-preview-names="{'key1': val1, 'key2': val2, ...}"
PANTS_ENVIRONMENTS_PREVIEW_NAMES
pants.toml
[environments-preview.names]
key1 = val1
key2 = val2
...
default: {}

A mapping of logical names to addresses to environment targets. For example:

[environments-preview.names]
linux_local = "//:linux_env"
macos_local = "//:macos_env"
centos6 = "//:centos6_docker_env"
linux_ci = "build-support:linux_ci_env"
macos_ci = "build-support:macos_ci_env"

To use an environment for a given target, specify the name in the environment field on that target. Pants will consume the environment target at the address mapped from that name.

Pants will ignore any environment targets that are not given a name via this option.

Advanced options

None

Deprecated options

None

None