mirror of
https://github.com/astral-sh/setup-uv.git
synced 2025-05-17 06:34:45 +00:00
parent
85aa0bf0c1
commit
dd578776bb
5 changed files with 62 additions and 18 deletions
13
README.md
13
README.md
|
@ -72,15 +72,20 @@ to install the latest version that satisfies the range.
|
|||
|
||||
### Python version
|
||||
|
||||
You can use the input `python-version` to set the environment variable `UV_PYTHON` for the rest
|
||||
of your workflow.
|
||||
You can use the input `python-version` to
|
||||
|
||||
- set the environment variable `UV_PYTHON` for the rest of your workflow
|
||||
- create a new virtual environment with the specified python version
|
||||
- activate the virtual environment for the rest of your workflow
|
||||
|
||||
This will override any python version specifications in `pyproject.toml` and `.python-version`
|
||||
|
||||
```yaml
|
||||
- name: Install the latest version of uv and set the python version to 3.12
|
||||
- name: Install the latest version of uv and set the python version to 3.13t
|
||||
uses: astral-sh/setup-uv@v4
|
||||
with:
|
||||
python-version: "3.12"
|
||||
python-version: 3.13t
|
||||
- run: uv pip install --python=3.13t pip
|
||||
```
|
||||
|
||||
You can combine this with a matrix to test multiple python versions:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue