Fix for GDAL 3
parent
7b781aec09
commit
930c56d3b8
|
@ -141,12 +141,13 @@ else:
|
||||||
gdal_version = os.popen('gdal-config --version').read()
|
gdal_version = os.popen('gdal-config --version').read()
|
||||||
print('GDAL version: {0}'.format(gdal_version))
|
print('GDAL version: {0}'.format(gdal_version))
|
||||||
try:
|
try:
|
||||||
|
gdal_majorversion = int(gdal_version.split('.')[0])
|
||||||
gdal_subversion = int(gdal_version.split('.')[1])
|
gdal_subversion = int(gdal_version.split('.')[1])
|
||||||
except:
|
except:
|
||||||
raise Exception('gdal-config not found. GDAL does not appear to be installed ... cannot proceed. If you have installed gdal, ensure that you have path to gdal-config in your environment')
|
raise Exception('gdal-config not found. GDAL does not appear to be installed ... cannot proceed. If you have installed gdal, ensure that you have path to gdal-config in your environment')
|
||||||
|
|
||||||
env['GDALISCXX11'] = None
|
env['GDALISCXX11'] = None
|
||||||
if gdal_subversion >= 3:
|
if (gdal_majorversion > 2) or (gdal_subversion >= 3):
|
||||||
env['GDALISCXX11'] = 'True'
|
env['GDALISCXX11'] = 'True'
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue