b983ff4fa7
`uv --system` is failing in GitHub Actions, because `py --list-paths` returns all the pre-cached Pythons: ``` -V:3.12 * C:\hostedtoolcache\windows\Python\3.12.2\x64\python.exe -V:3.12-32 C:\hostedtoolcache\windows\Python\3.12.2\x86\python.exe -V:3.11 C:\hostedtoolcache\windows\Python\3.11.8\x64\python.exe -V:3.11-32 C:\hostedtoolcache\windows\Python\3.11.8\x86\python.exe -V:3.10 C:\hostedtoolcache\windows\Python\3.10.11\x64\python.exe -V:3.10-32 C:\hostedtoolcache\windows\Python\3.10.11\x86\python.exe -V:3.9 C:\hostedtoolcache\windows\Python\3.9.13\x64\python.exe -V:3.9-32 C:\hostedtoolcache\windows\Python\3.9.13\x86\python.exe -V:3.8 C:\hostedtoolcache\windows\Python\3.8.10\x64\python.exe -V:3.8-32 C:\hostedtoolcache\windows\Python\3.8.10\x86\python.exe -V:3.7 C:\hostedtoolcache\windows\Python\3.7.9\x64\python.exe -V:3.7-32 C:\hostedtoolcache\windows\Python\3.7.9\x86\python.exe ``` So, our default selector returns the first entry here. But none of these are actually in `PATH` except the one that the user installed via `actions/setup-python@v5` -- that's the point of the action, that it puts the correct versions in `PATH`. It seems to me like we should prioritize `PATH` over `py --list-paths`. Is there a good reason not to do this? Closes: https://github.com/astral-sh/uv/issues/2056
112 lines
2.5 KiB
YAML
112 lines
2.5 KiB
YAML
name: System Install
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref_name }}-${{ github.event.pull_request.number || github.sha }}
|
|
cancel-in-progress: true
|
|
|
|
env:
|
|
CARGO_INCREMENTAL: 0
|
|
CARGO_NET_RETRY: 10
|
|
CARGO_TERM_COLOR: always
|
|
RUSTUP_MAX_RETRIES: 10
|
|
|
|
jobs:
|
|
install-ubuntu:
|
|
name: "Install Python on Ubuntu"
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: actions/setup-python@v5
|
|
with:
|
|
python-version: "3.12"
|
|
|
|
- name: "Install Rust toolchain"
|
|
run: rustup show
|
|
|
|
- uses: Swatinem/rust-cache@v2
|
|
|
|
- name: "Build"
|
|
run: cargo build
|
|
|
|
- name: "Print Python path"
|
|
run: echo $(which python)
|
|
|
|
- name: "Validate global Python install"
|
|
run: python scripts/check_system_python.py --uv ./target/debug/uv
|
|
|
|
install-macos:
|
|
name: "Install Python on macOS"
|
|
runs-on: macos-14
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: "Install Python"
|
|
run: brew install python@3.8
|
|
|
|
- name: "Install Rust toolchain"
|
|
run: rustup show
|
|
|
|
- uses: Swatinem/rust-cache@v2
|
|
|
|
- name: "Build"
|
|
run: cargo build
|
|
|
|
- name: "Print Python path"
|
|
run: echo $(which python3.11)
|
|
|
|
- name: "Validate global Python install"
|
|
run: python3.11 scripts/check_system_python.py --uv ./target/debug/uv
|
|
|
|
install-windows:
|
|
name: "Install Python on Windows"
|
|
runs-on: windows-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: actions/setup-python@v5
|
|
with:
|
|
python-version: "3.10"
|
|
|
|
- name: "Install Rust toolchain"
|
|
run: rustup show
|
|
|
|
- uses: Swatinem/rust-cache@v2
|
|
|
|
- name: "Build"
|
|
run: cargo build
|
|
|
|
- name: "Print Python path"
|
|
run: echo $(which python)
|
|
|
|
- name: "Validate global Python install"
|
|
run: py -3.10 ./scripts/check_system_python.py --uv ./target/debug/uv
|
|
|
|
install-pyenv:
|
|
name: "Install Python using pyenv"
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: "Install pyenv"
|
|
uses: "gabrielfalcao/pyenv-action@v18"
|
|
with:
|
|
default: 3.9.7
|
|
|
|
- name: "Install Rust toolchain"
|
|
run: rustup show
|
|
|
|
- uses: Swatinem/rust-cache@v2
|
|
|
|
- name: "Build"
|
|
run: cargo build
|
|
|
|
- name: "Print Python path"
|
|
run: echo $(which python3.9)
|
|
|
|
- name: "Validate global Python install"
|
|
run: python3.9 scripts/check_system_python.py --uv ./target/debug/uv
|