diff options
| author | Jason R. Coombs <jaraco@jaraco.com> | 2019-01-26 16:53:34 -0500 |
|---|---|---|
| committer | Jason R. Coombs <jaraco@jaraco.com> | 2019-01-26 16:53:34 -0500 |
| commit | 6671b3f5be254f32732e38e24e6cc8c3618029bd (patch) | |
| tree | 21694dd8610ec9f615c3430715586fa6c3a46560 | |
| parent | 3e23fa7a70bfad53c1a052dd9558cf099b7e0209 (diff) | |
| download | python-setuptools-git-6671b3f5be254f32732e38e24e6cc8c3618029bd.tar.gz | |
Pin pip to <19 until a more permanent solution can be devised. Ref #1644.
| -rw-r--r-- | pip-wrapper.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/pip-wrapper.py b/pip-wrapper.py index f255b679..5cb59640 100644 --- a/pip-wrapper.py +++ b/pip-wrapper.py @@ -3,6 +3,7 @@ Wrap the pip command to: - 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 sys 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) |
