python-config上可能有BUG?!它不会打印使用 --ldflags 时的完整路径 [英] possible BUG on python-config ?! it doesn't print the full path of when using --ldflags

查看:78
本文介绍了python-config上可能有BUG?!它不会打印使用 --ldflags 时的完整路径的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

$ 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

它打印 Python.framework/Versions/2.7/Python 而不是 /Library/Frameworks/Python.framework/Versions/2.7/Python

当尝试在 Makefile 中使用它时,它不适用于 python-config --ldflags 但如果我获取输出并更改 Python.framework/Versions/2.7/Python/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.

  • 我想避免解析 python-config 输出的解决方案生成文件.
  • 我使用的是 gcc 4.2.1 版
  • I want to avoid a solution which parses the python-config output in the makefile.
  • I am using gcc version 4.2.1

推荐答案

这是一个已知错误,三周前已修复:http://bugs.python.org/issue16848.该修复程序将随 2.7.4 版本一起发布,该版本计划于 4 月 6 日上线.

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.

这篇关于python-config上可能有BUG?!它不会打印使用 --ldflags 时的完整路径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆