$ python-config --ldflags
-L/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/config -ldl -framework CoreFoundation -lpython2.7 -u _PyMac_Error Python.framework/Versions/2.7/Python
it prints Python.framework/Versions/2.7/Python
and not /Library/Frameworks/Python.framework/Versions/2.7/Python
when trying to use it in a Makefile
it doesn't work with the python-config --ldflags
but if I take the output and changes Python.framework/Versions/2.7/Python
to /Library/Frameworks/Python.framework/Versions/2.7/Python
it works perfectly.
- I want to avoid a solution which parses the
python-config
output in the makefile. - I am using
gcc version 4.2.1
This is a known bug, and it was fixed three weeks ago: http://bugs.python.org/issue16848. The fix will ship with the 2.7.4 release, which is scheduled to go live on April 6.
来源:https://stackoverflow.com/questions/15634863/possible-bug-on-python-config-it-doesnt-print-the-full-path-of-when-using