Merge pull request #4171 from msitu/decode_darwin_value

fix pg_config error for darwin os
This commit is contained in:
Artem Pavlenko 2020-09-04 14:16:05 +01:00 committed by GitHub
commit 23b8ecc997
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -615,7 +615,7 @@ def parse_config(context, config, checks='--libs --cflags'):
# and thus breaks knowledge below that gdal worked # and thus breaks knowledge below that gdal worked
# TODO - upgrade our scons logic to support Framework linking # TODO - upgrade our scons logic to support Framework linking
if env['PLATFORM'] == 'Darwin': if env['PLATFORM'] == 'Darwin':
value = call(cmd,silent=True) value = call(cmd,silent=True).decode("utf-8")
if value and '-framework GDAL' in value: if value and '-framework GDAL' in value:
env['LIBS'].append('gdal') env['LIBS'].append('gdal')
if os.path.exists('/Library/Frameworks/GDAL.framework/unix/lib'): if os.path.exists('/Library/Frameworks/GDAL.framework/unix/lib'):