python-bootstrap
Options used to locate Python interpreters used by all Pants backends.
This subsystem controls where and how Pants will locate Python, but beyond that it does not control which Python interpreter versions are actually used for your code: see the python
subsystem for that.
Backend: pants.core
Config section: [python-bootstrap]
Basic options
None
Advanced options
search_path
search_path
--python-bootstrap-search-path="[<binary-paths>, <binary-paths>, ...]"
PANTS_PYTHON_BOOTSTRAP_SEARCH_PATH
[ "<PYENV>", "<PATH>" ]
A list of paths to search for Python interpreters.
Which interpeters are actually used from these paths is context-specific: the Python backend selects interpreters using options on the python
subsystem, in particular, the [python].interpreter_constraints
option.
You can specify absolute paths to interpreter binaries and/or to directories containing interpreter binaries. The order of entries does not matter.
The following special strings are supported:
<PATH>
, the contents of the PATH env var<ASDF>
, all Python versions currently configured by ASDF(asdf shell, ${HOME}/.tool-versions)
, with a fallback to all installed versions<ASDF_LOCAL>
, the ASDF interpreter with the version in BUILD_ROOT/.tool-versions<PYENV>
, all Python versions under $(pyenv root)/versions<PYENV_LOCAL>
, the Pyenv interpreter with the version in BUILD_ROOT/.python-version<PEXRC>
, paths in the PEX_PYTHON_PATH variable in /etc/pexrc or ~/.pexrc
names
names
--python-bootstrap-names="[<python-binary-names>, <python-binary-names>, ...]"
PANTS_PYTHON_BOOTSTRAP_NAMES
[ "python", "python3" ]
The names of Python binaries to search for. See the --search-path
option to influence where interpreters are searched for.
This does not impact which Python interpreter is used to run your code, only what is used to run internal tools.
Deprecated options
None
Updated about 1 month ago