aboutsummaryrefslogtreecommitdiffstats
path: root/python/mach_bootstrap.py
diff options
context:
space:
mode:
authorMatthew Young <mabufo@gmail.com>2018-06-06 20:25:32 -0500
committerMatthew Young <mabufo@gmail.com>2018-06-06 20:25:32 -0500
commitcb18d8aff0bbd71db395339a5abfdb351ccf3d6d (patch)
tree44d667968e41827d495f0dacabebcf4f78cffa0f /python/mach_bootstrap.py
parent9b906689156cf9ab9ba837f3ad04dbbba1cc1e28 (diff)
downloadservo-cb18d8aff0bbd71db395339a5abfdb351ccf3d6d.tar.gz
servo-cb18d8aff0bbd71db395339a5abfdb351ccf3d6d.zip
removed sys.platform check & consolidated the pip invocations
The sys.platform check in need_pip_upgrade was doing effectively the same pip invocation regardless of what platform we were evaluating to. Additionally, removed some duplicate definitions of the python variable which was already in scope higher up in the function.
Diffstat (limited to 'python/mach_bootstrap.py')
-rw-r--r--python/mach_bootstrap.py17
1 files changed, 1 insertions, 16 deletions
diff --git a/python/mach_bootstrap.py b/python/mach_bootstrap.py
index 7b32c8c69c0..2db4bf01c30 100644
--- a/python/mach_bootstrap.py
+++ b/python/mach_bootstrap.py
@@ -193,18 +193,7 @@ 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
- 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"])
+ _process_exec([python, "-m", "pip", "install", "-I", "-U", "pip"])
for req_rel_path in requirements_paths:
req_path = os.path.join(topdir, req_rel_path)
@@ -217,10 +206,6 @@ def _activate_virtualenv(topdir, is_firefox):
except OSError:
pass
- 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([python, "-m", "pip", "install", "-I", "-r", req_path])
open(marker_path, 'w').close()