mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
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:
parent
f757fa46ac
commit
88a35b3cc9
26 changed files with 131 additions and 153 deletions
10
shell.nix
10
shell.nix
|
@ -5,7 +5,7 @@
|
|||
buildAndroid ? false
|
||||
}:
|
||||
with import (builtins.fetchTarball {
|
||||
url = "https://github.com/NixOS/nixpkgs/archive/d04953086551086b44b6f3c6b7eeb26294f207da.tar.gz";
|
||||
url = "https://github.com/NixOS/nixpkgs/archive/5d67ea6b4b63378b9c13be21e2ec9d1afc921713.tar.gz";
|
||||
}) {
|
||||
overlays = [
|
||||
(import (builtins.fetchTarball {
|
||||
|
@ -84,7 +84,13 @@ stdenv.mkDerivation (androidEnvironment // {
|
|||
|
||||
# Build utilities
|
||||
cmake dbus gcc git pkg-config which llvm perl yasm m4
|
||||
(python3.withPackages (ps: with ps; [virtualenv pip dbus]))
|
||||
|
||||
# Ensure the Python version is same as the one in `.python-version` file so
|
||||
# that `uv` will just symlink to the one in nix store. Otherwise `uv` will
|
||||
# download a pre-built binary that won't work on nix.
|
||||
# FIXME: dbus python module needs to be installed into the virtual environment.
|
||||
python312
|
||||
uv
|
||||
|
||||
# This pins gnumake to 4.3 since 4.4 breaks jobserver
|
||||
# functionality in mozjs and causes builds to be extremely
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue