diff options
author | bors-servo <lbergstrom+bors@mozilla.com> | 2018-06-06 22:04:04 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-06-06 22:04:04 -0400 |
commit | 07ba57b864c00c820c601e420032d1ed682b6af2 (patch) | |
tree | f31a230d674b1d3349bc84058d556d3fae01fbd3 /python | |
parent | 464a3ef390cf490610aaa4d92905eafb5a6f907d (diff) | |
parent | cb18d8aff0bbd71db395339a5abfdb351ccf3d6d (diff) | |
download | servo-07ba57b864c00c820c601e420032d1ed682b6af2.tar.gz servo-07ba57b864c00c820c601e420032d1ed682b6af2.zip |
Auto merge of #20998 - matt-y:python-virtualenv-setup-pip-incovation-fix, r=jdm
Change to pip dependency install invocation during virtualenv setup in build
<!-- Please describe your changes on the following line: -->
Fix for https://github.com/servo/servo/issues/20990
In short, the pip invocation was causing my build on OSX to break. Using `python -m pip` in place of `pip` when setting up the virtual environment fixes the environment setup failure and allows the build to proceed.
---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [ ] These changes fix #20990
<!-- Either: -->
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because _____
<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->
<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
<!-- 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/20998)
<!-- Reviewable:end -->
Diffstat (limited to 'python')
-rw-r--r-- | python/mach_bootstrap.py | 19 |
1 files changed, 2 insertions, 17 deletions
diff --git a/python/mach_bootstrap.py b/python/mach_bootstrap.py index dfc52d4b1dc..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,11 +206,7 @@ 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([pip, "install", "-I", "-r", req_path]) + _process_exec([python, "-m", "pip", "install", "-I", "-r", req_path]) open(marker_path, 'w').close() |