在Mac OS X 10.5下安装pysvn
在python中与svn进行通信交流是少不了pysvn这个C扩展的,但无论是在FreeBSD还是Mac OS X下安装这个家伙都是对自己RP的一种考验。 其实错误主要来自编译的时候会有一个dylib找不到
powerpc-apple-darwin9-g++-4.0.1: /opt/local/libpython2.5.dylib: No such file or directory
make: *** [pysvn/_pysvn_2_5.so] Error 1
那么就改造一下Makefile吧,patch如下
--- Makefile.orig 2008-04-17 09:47:44.000000000 +0800
+++ Makefile 2008-04-17 09:50:31.000000000 +0800
@@ -10,8 +10,8 @@
CCFLAGS=-Wall -Wno-long-double -fPIC -I/opt/local/include/python2.5 -I/Users/guixing/Downloads/pysvn-1.5.3/Import/pycxx-5.4.0 -I/Users/guixing/Downloads/pysvn-1.5.3/Import/pycxx-5.4.0/Src -I/usr/include/subversion-1 -I/usr/include/apr-1 -I.
PYCXX=/Users/guixing/Downloads/pysvn-1.5.3/Import/pycxx-5.4.0
PYCXXSRC=/Users/guixing/Downloads/pysvn-1.5.3/Import/pycxx-5.4.0/Src
-LDSHARED=g++ -bundle -u _PyMac_Error -framework System /opt/local/libpython2.5.dylib -framework CoreFoundation -framework Kerberos -framework Security
-LDLIBS=-L/usr/lib -L/usr/lib -lsvn_client-1 -lsvn_repos-1 -lsvn_wc-1 -lsvn_fs-1 -lsvn_subr-1 -lsvn_diff-1 -lapr-1
+LDSHARED=g++ -bundle -u _PyMac_Error -framework System /opt/local/lib/libpython2.5.dylib -framework CoreFoundation -framework Kerberos -framework Security
+LDLIBS=-L/usr/lib -L/usr/lib -L/opt/local/lib -lsvn_client-1 -lsvn_repos-1 -lsvn_wc-1 -lsvn_fs-1 -lsvn_subr-1 -lsvn_diff-1 -lapr-1
#include pysvn_common.mak
#
# pysvn_common.mak
Last modified on 2008-04-17