Fix linking against python failing for brew based python installs on OS X
This commit is contained in:
parent
cc14562f2c
commit
58b220abc6
1 changed files with 4 additions and 2 deletions
6
setup.py
6
setup.py
|
|
@ -54,9 +54,11 @@ def get_python_flags(cflags):
|
|||
if val and '/{}.framework'.format(fw) in val:
|
||||
fdir = val[:val.index('/{}.framework'.format(fw))]
|
||||
if os.path.isdir(os.path.join(fdir, '{}.framework'.format(fw))):
|
||||
libs.append('-F' + fdir)
|
||||
framework_dir = fdir
|
||||
break
|
||||
libs.extend(['-framework', fw])
|
||||
else:
|
||||
raise SystemExit('Failed to find Python framework')
|
||||
libs.append(os.path.join(framework_dir, sysconfig.get_config_var('LDLIBRARY')))
|
||||
else:
|
||||
libs += ['-L' + sysconfig.get_config_var('LIBDIR')]
|
||||
libs += ['-lpython' + sysconfig.get_config_var('VERSION') + sys.abiflags]
|
||||
|
|
|
|||
Loading…
Reference in a new issue