Building pysvn Extension
Prerequisites
To build pysvn you will require:
- Python 2.2 or later with these options:
- Python runtime package
- Python development package
- Python pyexpat package
- subversion 1.2.x, 1.3.x 1.4.x or 1.5.x with these options:
- Subversion client package
- Subversion development package
- PyCXX V5.5.0 to build against Python 2 which is included in the pysvn source kit.
- PyCXX V6.0.0 to build against Python 3 which is included in the pysvn source kit.
Some distributions will split python and subversion into more the one package.
You will need to find all the packages that give you the options listed above.
Building on win32
These instructions assume you have Microsoft Visual C++ 6.0 to compile the code
and INNO 4.0.10 to create the installation kit.
Note: You must build with MSVC 6.0 as python 2.3 and earlier was built with that version.
Note: You must build with MSVC 2003.NET for python 2.4 or Python 2.5.
Note: You must build with MSVC 2008 (9.0) for Python 2.6 or later and python 3.0 or later.
- Build subversion (tested with SVN 1.4.6 and svn 1.5.4)
- Fetch and expand the pysvn source code into extdir
- Expand pycxx-5.4.2.tar.gz into extdir\Import if not using a source kit
- Edit Builder\builder_custom_init.cmd to match the locations of the sources.
cd Builder
builder_custom_init.cmd
nmake -f win32.mak build
To install the built kit
- Uninstall any previous kit (control panel's Add/Remove programs)
nmake -f win32.mak install
Building on unix and Mac OS X systems.
- Install subversion.
When installing from packages you will need to install the devel packages as well. For example on Fedora/Redhat subversion-devel, apr-devel, apr-util-devel and their dependancies.
- Get the pysvn source code
- For Python 2 builds:
tar xzf pycxx-5.5.0.tar.gz
into extdir/Import if not using a source kit
- For Python 3 builds:
tar xzf pycxx-6.0.0.tar.gz
into extdir/Import if not using a source kit
cd Source
- For Python 2 builds: backport the PySVN code using
python setup.py backport
- Create the Makefile using
python setup.py configure
make
cd Tests
- Test pysvn by running
make
Install pysvn by copying the following from Extension/Source
to python site-specific directory.
mkdir python-libdir/site-packages/pysvn
cp pysvn/__init__.py python-libdir/site-packages/pysvn
cp pysvn/_pysvn*.so python-libdir/site-packages/pysvn