Skip to content

Commit

Permalink
Upgrade pip properly on windows.
Browse files Browse the repository at this point in the history
  • Loading branch information
jdm committed May 15, 2018
1 parent a568a71 commit 1830321
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions python/mach_bootstrap.py
Expand Up @@ -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)
Expand Down

0 comments on commit 1830321

Please sign in to comment.