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 /python/servo/build_commands.py | |
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 'python/servo/build_commands.py')
-rw-r--r-- | python/servo/build_commands.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/python/servo/build_commands.py b/python/servo/build_commands.py index c48999f99f9..b21f89980c0 100644 --- a/python/servo/build_commands.py +++ b/python/servo/build_commands.py @@ -175,7 +175,7 @@ class MachCommands(CommandBase): return status @Command('clean', - description='Clean the target/ and python/_venv[version]/ directories', + description='Clean the target/ and Python virtual environment directories', category='build') @CommandArgument('--manifest-path', default=None, @@ -188,8 +188,7 @@ class MachCommands(CommandBase): def clean(self, manifest_path=None, params=[], verbose=False): self.ensure_bootstrapped() - virtualenv_fname = '_venv%d.%d' % (sys.version_info[0], sys.version_info[1]) - virtualenv_path = path.join(self.get_top_dir(), 'python', virtualenv_fname) + virtualenv_path = path.join(self.get_top_dir(), '.venv') if path.exists(virtualenv_path): print('Removing virtualenv directory: %s' % virtualenv_path) shutil.rmtree(virtualenv_path) |