From 01978ccf32e06c7f285365abc511e3b8d6975ebb Mon Sep 17 00:00:00 2001 From: Josh Mcguigan Date: Mon, 28 Oct 2019 04:58:28 -0700 Subject: [PATCH] mach activate virtual env for bootstrap --- python/mach_bootstrap.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/python/mach_bootstrap.py b/python/mach_bootstrap.py index ec506c881a6..9b36d3fec31 100644 --- a/python/mach_bootstrap.py +++ b/python/mach_bootstrap.py @@ -224,6 +224,14 @@ class DummyContext(object): def bootstrap_command_only(topdir): + # See if we're inside a Firefox checkout. + parentdir = os.path.normpath(os.path.join(topdir, '..')) + is_firefox = os.path.isfile(os.path.join(parentdir, + 'build/mach_bootstrap.py')) + # we should activate the venv before importing servo.boostrap + # because the module requires non-standard python packages + _activate_virtualenv(topdir, is_firefox) + from servo.bootstrap import bootstrap context = DummyContext()