1. #安装依赖
yum -y install subversion-devel apr-devel apr-util-devel
2. 安装svn客户端
yum -y install subversion
3. 下载安装包
wget http://pysvn.barrys-emacs.org/source_kits/pysvn-1.8.0.tar.gz
4. 开始编译安装pysvn
tar -xzvf pysvn-1.8.0.tar.gz
cd pysvn-1.8.0/Source/
python3 setup.py configure
make
cd pysvn/
# 复制文件到python安装目录(注意找自己安排python的位置)
# 创建pysvn插件文件夹
mkdir /usr/local/python/lib/python3.6/site-packages/pysvn
#拷贝文件
cp __init__.py /usr/local/python/lib/python3.6/site-packages/pysvn
cp _pysvn_3_6.so /usr/local/python/lib/python3.6/site-packages/pysvn
验证:
>>> import pysvn
>>> pysvn.version
(1, 8, 0, 0)