mach: adopt uv and avoid system python (#34632)

This allows us to use `uv` for:
1. Installing a pinned Python version
2. Installing the dependency packages using `uv`'s pip compatible interface.
4. Bootstrapping `mach` without a Python installion on the host, using `uv
   run`

This change also introduces a new 'composite' GitHub action to setup
python in the different CI workflows. There is no support for externally
managed python installations and virtual environments. These could be
added in the future.

Fixes #34095, #34547

Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
This commit is contained in:
Mukilan Thiyagarajan 2024-12-16 14:50:37 +05:30 committed by GitHub
parent f757fa46ac
commit 88a35b3cc9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
26 changed files with 131 additions and 153 deletions

View file

@ -35,9 +35,10 @@ jobs:
path: release-binary-linux
- name: unPackage binary
run: tar -xzf release-binary-linux/target.tar.gz
- name: Setup Python
uses: ./.github/actions/setup-python
- name: Bootstrap dependencies
run: |
python3 -m pip install --upgrade pip
sudo apt update
sudo apt install -qy --no-install-recommends mesa-vulkan-drivers
python3 ./mach bootstrap --skip-lints