Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Exit if pip version is detected to be too old. #14253

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

@@ -11,6 +11,14 @@ matrix:
- sudo: 9000
dist: trusty
script:
- which python
- which pip
- which virtualenv
- virtualenv --version
- pip install --upgrade pip virtualenv
- which pip
- which virtualenv
- virtualenv --version
- ./mach build -d --verbose
- ./mach test-compiletest
- ./mach test-unit
@@ -8,6 +8,8 @@
import platform
import sys
from distutils.spawn import find_executable
from distutils.version import LooseVersion
import subprocess
from subprocess import PIPE, Popen

SEARCH_PATHS = [
@@ -117,6 +119,11 @@ def _activate_virtualenv(topdir):
if not virtualenv:
sys.exit("Python virtualenv is not installed. Please install it prior to running mach.")

virtualenv_version = subprocess.check_output([virtualenv, "--version"])
print("virtual env version = {}".format(virtualenv_version))
if LooseVersion(virtualenv_version) < LooseVersion("14.0.0"):
sys.exit("virtualenv is too old. Please upgrade to at least version 14.0.0.")

process = Popen([virtualenv, "-p", python, virtualenv_path], stdout=PIPE, stderr=PIPE)
process.wait()
if process.returncode:
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.