Browse Source

deploy-ng: Raise a RuntimeError if pip is not version 9.0 or greater

This is when pip download was introduced and is required for deploy-ng.
Mitchell Stokes 8 years ago
parent
commit
37b9e256d8
1 changed files with 4 additions and 0 deletions
  1. 4 0
      direct/src/showutil/dist.py

+ 4 - 0
direct/src/showutil/dist.py

@@ -81,6 +81,10 @@ class build_apps(distutils.core.Command):
         if 'u' in abi_tag and (platform.startswith('win') or platform.startswith('macosx')):
             abi_tag = abi_tag.replace('u', '')
 
+        pip_version = pip.__version__.split('.')
+        if int(pip_version[0]) < 9:
+            raise RuntimeError("pip 9.0 or greater is required, but found {}".format(pip.__version__))
+
         pip_args = [
             'download',
             '-d', whldir,