Переглянути джерело

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 роки тому
батько
коміт
37b9e256d8
1 змінених файлів з 4 додано та 0 видалено
  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')):
         if 'u' in abi_tag and (platform.startswith('win') or platform.startswith('macosx')):
             abi_tag = abi_tag.replace('u', '')
             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 = [
         pip_args = [
             'download',
             'download',
             '-d', whldir,
             '-d', whldir,