aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbors-servo <lbergstrom+bors@mozilla.com>2019-01-03 00:04:05 -0500
committerGitHub <noreply@github.com>2019-01-03 00:04:05 -0500
commita42f2f4f18596552b123f22b2d546b6447eeea20 (patch)
treef44619cbe9ef6f3dd2b209930fa8f3aaf0e564bf
parente68585a26f21c70e70b85f9c79fc0edd0a12fb23 (diff)
parent448f3c84a7a45d70681561735b376ccbe6a55ff0 (diff)
downloadservo-a42f2f4f18596552b123f22b2d546b6447eeea20.tar.gz
servo-a42f2f4f18596552b123f22b2d546b6447eeea20.zip
Auto merge of #22595 - shanavas786:remove-virtualenv, r=jdm
Delete virtualenv when executing mach clean Closes #22588 <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/22595) <!-- Reviewable:end -->
-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]