Changeset 11083

Show
Ignore:
Timestamp:
03/26/07 23:30:17 (2 years ago)
Author:
hobu
Message:

Apply a slightly modified version of Didrik's patch for #1477

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/gdal/swig/python/setup.py

    r11080 r11083  
    2828    import numpy 
    2929    HAVE_NUMPY=True 
    30     print 'numpy include', get_numpy_include() 
    31     if get_numpy_include() =='.': 
    32         print "numpy headers were not found!  Array support will not be enabled" 
    33         HAVE_NUMPY=False 
     30    # check version 
     31    numpy_major = numpy.__version__.split('.')[0] 
     32    if int(numpy_major) < 1: 
     33        print "numpy version must be > 1.0.0" 
     34        HAVE_NUMPY = False 
     35    else: 
     36        print 'numpy include', get_numpy_include() 
     37        if get_numpy_include() =='.': 
     38            print "numpy headers were not found!  Array support will not be enabled" 
     39            HAVE_NUMPY=False 
    3440except ImportError: 
    3541    pass