Env variables for python downloads (#6416)
## Summary Resolves #6406 ## Test Plan ``` ❯ UV_PYTHON_PREFERENCE=only-managed cargo run -q -- sync --show-settings | rg python_preference python_preference: OnlyManaged, ❯ UV_PYTHON_PREFERENCE=system cargo run -q -- sync --show-settings | rg python_preference python_preference: System, ❯ UV_NO_PYTHON_DOWNLOADS=1 cargo run -q -- sync --show-settings | rg python_downloads python_downloads: Never, ❯ UV_ALLOW_PYTHON_DOWNLOADS=1 cargo run -q -- sync --show-settings | rg python_downloads python_downloads: Automatic, ```
This commit is contained in:
@@ -69,6 +69,10 @@ In addition, uv respects the following environment variables:
|
||||
packages.
|
||||
- `UV_TOOL_DIR`: Used to specify the directory where uv will store managed tools.
|
||||
- `UV_TOOL_BIN_DIR`: Used to specify the "bin" directory where uv will install tool executables.
|
||||
- `UV_NO_PYTHON_DOWNLOADS`: Disable automatic downloads of Python.
|
||||
- `UV_ALLOW_PYTHON_DOWNLOADS`: Allow automatically downloading Python when required.
|
||||
- `UV_PYTHON_PREFERENCE`: Whether to prefer using Python installations that are already present on
|
||||
the system, or those that are downloaded and installed by uv.
|
||||
- `UV_PYTHON_INSTALL_DIR`: Used to specify the directory where uv will store managed Python
|
||||
installations.
|
||||
- `UV_PYTHON_INSTALL_MIRROR`: Managed Python installations are downloaded from
|
||||
|
||||
Reference in New Issue
Block a user