From 448f3c84a7a45d70681561735b376ccbe6a55ff0 Mon Sep 17 00:00:00 2001 From: Shanavas M Date: Thu, 3 Jan 2019 09:51:05 +0530 Subject: Delete virtualenv when executing mach clean Closes #22588 --- python/servo/build_commands.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'python') diff --git a/python/servo/build_commands.py b/python/servo/build_commands.py index 4211cc84d96..2e6979d0fca 100644 --- a/python/servo/build_commands.py +++ b/python/servo/build_commands.py @@ -622,6 +622,11 @@ class MachCommands(CommandBase): def clean(self, manifest_path=None, params=[], verbose=False): self.ensure_bootstrapped() + virtualenv_path = path.join(self.get_top_dir(), 'python', '_virtualenv') + if path.exists(virtualenv_path): + print('Removing virtualenv directory: %s' % virtualenv_path) + shutil.rmtree(virtualenv_path) + opts = [] if manifest_path: opts += ["--manifest-path", manifest_path] -- cgit v1.2.3