diff --git a/pip-wrapper.py b/pip-wrapper.py index f255b67915..5cb5964029 100644 --- a/pip-wrapper.py +++ b/pip-wrapper.py @@ -3,6 +3,7 @@ - Avoid the default 'python -m pip' invocation, which causes the current working directory to be added to the path, which causes problems. +- Ensure pip meets a requisite version. """ @@ -10,7 +11,15 @@ import subprocess +def ensure_pip_version(pip_bin, ver): + cmd = [pip_bin, 'install', 'pip ' + ver] + subprocess.check_call(cmd) + + def main(): + pip_bin = sys.argv[1] + # workaround for #1644 + ensure_pip_version(pip_bin, '<19') cmd = sys.argv[1:] subprocess.check_call(cmd)