diff options
author | Mukilan Thiyagarajan <mukilan@igalia.com> | 2024-12-09 20:22:06 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-12-09 14:52:06 +0000 |
commit | 4103421ba5dc401817128661d759bb18b0aec8f1 (patch) | |
tree | e354c40429ef14c294aaf79c2cebcb9919927216 /shell.nix | |
parent | a0743f60b36e376884456c3ab7c7e25ce2d2a57f (diff) | |
download | servo-4103421ba5dc401817128661d759bb18b0aec8f1.tar.gz servo-4103421ba5dc401817128661d759bb18b0aec8f1.zip |
mach: switch to `uv` for managing python venv (#34504)
This patch switches servo to use `uv` for both installing a pinned
Python version as well as installing the dependency packages using
`uv`'s pip compatible interface. It 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
Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
Diffstat (limited to 'shell.nix')
-rw-r--r-- | shell.nix | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/shell.nix b/shell.nix index 2576e0e454f..fd110442cd6 100644 --- a/shell.nix +++ b/shell.nix @@ -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 |