aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShanavas M <shanavas.m2@gmail.com>2019-01-03 09:51:05 +0530
committerShanavas M <shanavas.m2@gmail.com>2019-01-03 09:51:05 +0530
commit448f3c84a7a45d70681561735b376ccbe6a55ff0 (patch)
treef44619cbe9ef6f3dd2b209930fa8f3aaf0e564bf
parente68585a26f21c70e70b85f9c79fc0edd0a12fb23 (diff)
downloadservo-448f3c84a7a45d70681561735b376ccbe6a55ff0.tar.gz
servo-448f3c84a7a45d70681561735b376ccbe6a55ff0.zip
Delete virtualenv when executing mach clean
Closes #22588
-rw-r--r--python/servo/build_commands.py5
1 files changed, 5 insertions, 0 deletions
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]