Append python-config output only once

This commit is contained in:
Eric Müller 2018-10-23 12:38:41 +02:00
parent 88e9382f1b
commit 1efa74d38a
1 changed files with 4 additions and 0 deletions

View File

@ -329,6 +329,10 @@ def check_python_headers(conf, features='pyembed pyext'):
conf.find_program([''.join(pybin) + '-config', 'python%s-config' % num, 'python-config-%s' % num, 'python%sm-config' % num], var='PYTHON_CONFIG', msg="python-config", mandatory=False)
if env.PYTHON_CONFIG:
# check python-config output only once
if conf.env.HAVE_PYTHON_H:
return
# python2.6-config requires 3 runs
all_flags = [['--cflags', '--libs', '--ldflags']]
if sys.hexversion < 0x2070000: