Handle build failing when running under pyenv

This commit is contained in:
Kovid Goyal 2017-01-08 08:48:31 +05:30
parent fcb072bbd9
commit b3fbb938b3

View File

@ -79,6 +79,10 @@ def init_env(debug=False, asan=False):
cflags.append('-I' + sysconfig.get_config_var('CONFINCLUDEPY')) cflags.append('-I' + sysconfig.get_config_var('CONFINCLUDEPY'))
if isosx: if isosx:
fd = sysconfig.get_config_var('LIBDIR') fd = sysconfig.get_config_var('LIBDIR')
try:
fd = fd[:fd.index('/Python.framework')]
except ValueError:
fd = sysconfig.get_config_var('LIBDEST')
fd = fd[:fd.index('/Python.framework')] fd = fd[:fd.index('/Python.framework')]
pylib = ['-F', fd, '-framework', 'Python.framework'] pylib = ['-F', fd, '-framework', 'Python.framework']
else: else: