From a568a71498c233247e183dfd893fd0b6095f6a1a Mon Sep 17 00:00:00 2001 From: Josh Matthews Date: Mon, 14 May 2018 09:58:38 -0400 Subject: [PATCH 1/2] Don't suppress errors when executing mach bootstrap processes. Omitting an argument to sys.exit causes it to default to 0, so buildbot doesn't report it as an error. --- python/mach_bootstrap.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/mach_bootstrap.py b/python/mach_bootstrap.py index 4bbd1fe7d95..65c34415b8a 100644 --- a/python/mach_bootstrap.py +++ b/python/mach_bootstrap.py @@ -119,7 +119,7 @@ def _process_exec(args): err.seek(0) shutil.copyfileobj(err, sys.stdout) - sys.exit() + sys.exit(1) def wpt_path(is_firefox, topdir, *paths): From 18303211cb5b0dfb17a51801a30aba4727e1de29 Mon Sep 17 00:00:00 2001 From: Josh Matthews Date: Tue, 15 May 2018 10:21:50 -0500 Subject: [PATCH 2/2] Upgrade pip properly on windows. --- python/mach_bootstrap.py | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/python/mach_bootstrap.py b/python/mach_bootstrap.py index 65c34415b8a..dfc52d4b1dc 100644 --- a/python/mach_bootstrap.py +++ b/python/mach_bootstrap.py @@ -193,11 +193,18 @@ def _activate_virtualenv(topdir, is_firefox): if need_pip_upgrade: # Upgrade pip when virtualenv is created to fix the issue # https://github.com/servo/servo/issues/11074 - pip = _get_exec_path(PIP_NAMES, is_valid_path=check_exec_path) - if not pip: - sys.exit("Python pip is either not installed or not found in virtualenv.") + if sys.platform in ['msys', 'win32']: + python = _get_exec_path(PYTHON_NAMES, is_valid_path=check_exec_path) + if not python: + sys.exit("Python is either not installed or not found in virtualenv.") - _process_exec([pip, "install", "-I", "-U", "pip"]) + _process_exec([python, "-m", "pip", "install", "-I", "-U", "pip"]) + else: + pip = _get_exec_path(PIP_NAMES, is_valid_path=check_exec_path) + if not pip: + sys.exit("Python pip is either not installed or not found in virtualenv.") + + _process_exec([pip, "install", "-I", "-U", "pip"]) for req_rel_path in requirements_paths: req_path = os.path.join(topdir, req_rel_path)