Merge pull request #1614 from blink1073/handle-pip-upgrade

Do not try and upgrade other large dependencies on pip install
This commit is contained in:
Stefan van der Walt
2015-07-27 14:16:01 -07:00
+8 -2
View File
@@ -63,8 +63,14 @@ if __name__ == "__main__":
try:
from numpy.distutils.core import setup
extra = {'configuration': configuration}
# do not risk updating numpy
INSTALL_REQUIRES = [r for r in INSTALL_REQUIRES if 'numpy' not in r]
# Do not try and upgrade larger dependencies
for lib in ['scipy', 'numpy', 'matplotlib', 'pillow']:
try:
__import__(lib)
INSTALL_REQUIRES = [i for i in INSTALL_REQUIRES
if lib not in i]
except ImportError:
pass
except ImportError:
if len(sys.argv) >= 2 and ('--help' in sys.argv[1:] or
sys.argv[1] in ('--help-commands',