mirror of
https://github.com/astral-sh/setup-uv.git
synced 2026-10-01 00:29:51 +00:00
Add a Python architecture input
This commit is contained in:
@@ -11,6 +11,7 @@ The cache key is automatically generated based on:
|
||||
`pc-windows-msvc`)
|
||||
- **OS version**: OS name and version (e.g., `ubuntu-22.04`, `macos-14`, `windows-2022`)
|
||||
- **Python version**: The Python version in use
|
||||
- **Python architecture**: The architecture selected by `python-arch` or `UV_PYTHON_ARCH`, when set
|
||||
- **Cache options**: Whether pruning and Python caching are enabled
|
||||
- **Dependency hash**: Hash of files matching `cache-dependency-glob`
|
||||
- **Suffix**: Optional `cache-suffix` if provided
|
||||
|
||||
@@ -144,6 +144,7 @@ If you want to ignore this, set the `ignore-empty-workdir` input to `true`.
|
||||
This action sets several environment variables that influence uv's behavior and can be used by subsequent steps:
|
||||
|
||||
- `UV_PYTHON`: Set when `python-version` is specified or the selected `.tool-versions` file contains a supported `python` entry. Controls which Python version uv uses.
|
||||
- `UV_PYTHON_ARCH`: Set when `python-arch` is specified. Controls the architecture of Python requests that do not specify one.
|
||||
- `UV_CACHE_DIR`: Set when caching is enabled (unless already configured in uv config files). Controls where uv stores its cache.
|
||||
- `UV_TOOL_DIR`: Set when `tool-dir` input is specified. Controls where uv installs tool environments.
|
||||
- `UV_TOOL_BIN_DIR`: Set when `tool-bin-dir` input is specified. Controls where uv installs tool binaries.
|
||||
@@ -155,6 +156,7 @@ This action sets several environment variables that influence uv's behavior and
|
||||
- `UV_NO_MODIFY_PATH`: If set, prevents the action from modifying PATH. Cannot be used with `activate-environment`.
|
||||
- `UV_CACHE_DIR`: If already set, the action will respect it instead of setting its own cache directory.
|
||||
- `UV_PYTHON`: If already set and `python-version` is not specified, the action will respect it instead of using the `python` entry from `.tool-versions`.
|
||||
- `UV_PYTHON_ARCH`: If already set and `python-arch` is not specified, the action will use it and include it in the cache key. Requires a uv version that supports `UV_PYTHON_ARCH`.
|
||||
|
||||
```yaml
|
||||
- name: Example using environment variables
|
||||
|
||||
Reference in New Issue
Block a user