From 526fe68773dd3b1f2e72beb6ce45c206d353d0ae Mon Sep 17 00:00:00 2001 From: Thomas Nagy Date: Sun, 17 Feb 2013 14:29:41 +0100 Subject: [PATCH] Issue 1231 --- ChangeLog | 1 + waflib/Tools/python.py | 14 ++++++++++---- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5aedd301..143a5408 100644 --- a/ChangeLog +++ b/ChangeLog @@ -4,6 +4,7 @@ NEW IN WAF 1.7.10 * Codelite plugin by Christian Klein * Validate the versioned library number #1180 * New export_defines keyword for C/C++/Fortran libraries +* Python config tests enhancements #1231 NEW IN WAF 1.7.9 ---------------- diff --git a/waflib/Tools/python.py b/waflib/Tools/python.py index 2feb8e60..19909811 100644 --- a/waflib/Tools/python.py +++ b/waflib/Tools/python.py @@ -355,13 +355,19 @@ def check_python_headers(conf): except conf.errors.ConfigurationError: # python3.2, oh yeah xx = conf.env.CXX_NAME and 'cxx' or 'c' - conf.check_cfg(msg='Asking python-config for the flags (pyembed)', - path=conf.env.PYTHON_CONFIG, package='', uselib_store='PYEMBED', args=['--cflags', '--libs', '--ldflags']) + + flags = ['--cflags', '--libs', '--ldflags'] + + for f in flags: + conf.check_cfg(msg='Asking python-config for pyembed %s flags' % f, + path=conf.env.PYTHON_CONFIG, package='', uselib_store='PYEMBED', args=[f]) conf.check(header_name='Python.h', define_name='HAVE_PYTHON_H', msg='Getting pyembed flags from python-config', fragment=FRAG, errmsg='Could not build a python embedded interpreter', features='%s %sprogram pyembed' % (xx, xx)) - conf.check_cfg(msg='Asking python-config for the flags (pyext)', - path=conf.env.PYTHON_CONFIG, package='', uselib_store='PYEXT', args=['--cflags', '--libs', '--ldflags']) + + for f in flags: + conf.check_cfg(msg='Asking python-config for pyext %s flags' % f, + path=conf.env.PYTHON_CONFIG, package='', uselib_store='PYEXT', args=[f]) conf.check(header_name='Python.h', define_name='HAVE_PYTHON_H', msg='Getting pyext flags from python-config', features='%s %sshlib pyext' % (xx, xx), fragment=FRAG, errmsg='Could not build python extensions')