我使用的是macosxsnowleopard(10.6)附带的python2.5。我已经设置了默认值:defaults write com.apple.versioner.python Version 2.5
,通常我得到python2.5。在
然而,当我尝试构建mod wsgi时,这似乎并不符合。我使用了--with-python=/usr/bin/python2.5
选项configure
来强制它使用python2.5,但是构建的共享库最终引用了python2.6库。在
我也试过:
$VERSIONER_PYTHON_VERSION
设置为2.5--with-python
我通读了关于a similar SO question的讨论。与那个人不同的是,我使用的是macosxpython,它应该可以在mod wsgi构建过程中使用框架代码。在
下面是一些相关命令的输出。请注意结尾处otool -L
的最终输出,它显示它正在python2.6framework目录中查找。在
$ make distclean
rm -rf .libs
rm -f mod_wsgi.o mod_wsgi.la mod_wsgi.lo mod_wsgi.slo mod_wsgi.loT
rm -f config.log config.status
rm -rf autom4te.cache
rm -f Makefile Makefile.in
$ ./configure --with-python=/usr/bin/python2.5
checking for apxs2... no
checking for apxs... /usr/sbin/apxs
checking Apache version... 2.2.14
configure: creating ./config.status
config.status: creating Makefile
$ make
(compilation messages, no errors)
$ otool -L .libs/mod_wsgi.so
.libs/mod_wsgi.so:
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 125.2.0)
/System/Library/Frameworks/Python.framework/Versions/2.6/Python (compatibility version 2.6.0, current version 2.6.1)
尝试使用“禁用框架”来“配置”。这将导致-L/-L用于链接Python库而不是框架链接。这是必要的,因为不知道如何使框架链接使用指定为“当前”以外的版本。在
相关问题 更多 >
编程相关推荐