aboutsummaryrefslogtreecommitdiffstats
path: root/python
diff options
context:
space:
mode:
authorJosh Matthews <josh@joshmatthews.net>2018-05-15 10:21:50 -0500
committerGitHub <noreply@github.com>2018-05-15 10:21:50 -0500
commit18303211cb5b0dfb17a51801a30aba4727e1de29 (patch)
treeecd71c3579c7149276d8d8ac4b3574fe650e5577 /python
parenta568a71498c233247e183dfd893fd0b6095f6a1a (diff)
downloadservo-18303211cb5b0dfb17a51801a30aba4727e1de29.tar.gz
servo-18303211cb5b0dfb17a51801a30aba4727e1de29.zip
Upgrade pip properly on windows.
Diffstat (limited to 'python')
-rw-r--r--python/mach_bootstrap.py17
1 files changed, 12 insertions, 5 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.")
-
- _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)