aboutsummaryrefslogtreecommitdiffstats
path: root/python
diff options
context:
space:
mode:
authorbors-servo <lbergstrom+bors@mozilla.com>2018-05-17 10:55:04 -0400
committerGitHub <noreply@github.com>2018-05-17 10:55:04 -0400
commit70e0aa1904e590bcce34ed2385f54fe46255b0c1 (patch)
tree0ec23274d4c4653fa8cb12b1ce15a8b9c6bc5c28 /python
parentd1f4fcfc514ea081550e4e31b6245535bf5d0827 (diff)
parent18303211cb5b0dfb17a51801a30aba4727e1de29 (diff)
downloadservo-70e0aa1904e590bcce34ed2385f54fe46255b0c1.tar.gz
servo-70e0aa1904e590bcce34ed2385f54fe46255b0c1.zip
Auto merge of #20782 - servo:jdm-patch-13, r=glennw
Don't suppress errors when executing mach bootstrap processes. [Omitting an argument](https://docs.python.org/2/library/sys.html#sys.exit) to sys.exit causes it to default to 0, so buildbot doesn't report it as an error. We were just lucky that the android builders happened to have a build step that failed that didn't rely on running python! <!-- 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/20782) <!-- Reviewable:end -->
Diffstat (limited to 'python')
-rw-r--r--python/mach_bootstrap.py19
1 files changed, 13 insertions, 6 deletions
diff --git a/python/mach_bootstrap.py b/python/mach_bootstrap.py
index 4bbd1fe7d95..dfc52d4b1dc 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):
@@ -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.")
-
- _process_exec([pip, "install", "-I", "-U", "pip"])
+ 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([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)