Commits

Anonymous committed a5a1f09

Issue 1231

Comments (0)

Files changed (2)

 * 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
 ----------------

waflib/Tools/python.py

 	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')