INSTALL.html 3.52 KB
Newer Older
1 2
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3 4
<html>
<head>
5 6 7 8 9
<style type="text/css">
h1, h2, h3 {color: #8080ff;}
code {background-color: #dddddd; }

</style>
10 11 12 13 14 15 16 17 18 19
<title>Building pysvn Extension</title>
</head>
<body>

<h1>Building pysvn Extension</h1>

<h2>Prerequisites</h2>

<p>To build pysvn you will require:</p>
<ul>
20
<li><a href="http://www.python.org">Python</a> 2.6 or later with these options:
21 22 23 24 25 26
<ul>
<li>Python runtime package
<li>Python development package
<li>Python pyexpat package
</ul>
</li>
27
<li><a href="http://subversion.tigris.org">subversion</a> 1.7.x or 1.8.x with these options:
28 29 30 31 32
<ul>
<li>Subversion client package
<li>Subversion development package
</ul>
</li>
33
<li><a href="http://sourceforge.net/project/showfiles.php?group_id=3180">PyCXX V6.2.4</a> to build against Python 2 or Python 3 which is included in the pysvn source kit.</li>
34
</ul>
35 36
<p>Some distributions will split python and subversion into more the one package.</p>
<p>You will need to find all the packages that give you the options listed above.</p>
37 38

<h3>Building on win32</h3>
39 40 41 42 43 44 45 46

<p>PYSVN sources have been updated to build on Windows 7 64bit version.
Expect issues on older windows and 32but windows.</p>

<p>These instructions assume you have Microsoft Visual C++ 2008 (9.0) to compile the code
and <a href="http://www.jrsoftware.org/">INNO</a> 5 to create the installation kit.</p>

<p>You must build with MSVC 2008 (9.0) for Python 2.6 or later and python 3.0 or later.</p>
47 48

<ol>
49
<li>Build subversion (tested with and svn 1.7.11 and 1.8.1)</li>
50
<li>Fetch and expand the pysvn source code into <em>extdir</em></li>
51
<li>Expand pycxx-6.2.4.tar.gz into <em>extdir</em>\Import if not using a source kit</li>
52
<li>Edit Builder\builder_custom_init.cmd to match the locations of the sources.</li>
53 54
<li><code>cd Builder</code></li>
<li><code>builder_custom_init.cmd</code></li>
55 56 57 58 59 60 61
<li><code>cd ..\Source</code>
<li><code>python setup.py configure ...</code> (add any configure options required to make it find the required libraries).</li>
<li><code>nmake</code></li>
<li><code>cd ..\Test</code></li>
<li><code>nmake</code></li>
<li><code>cd ..\Kit\Win32-1.7</code></li>
<li><code>nmake</code></li>
62 63 64 65 66
</ol>

<p>To install the built kit</p>

<ol>
67 68
<li>Uninstall any previous kit (control panel's Add/Remove programs)</li>
<li><code>nmake -f win32.mak install</code></li>
69 70
</ol>

71
<h3>Building on unix and Mac OS X systems.</h3>
72 73

<ol>
74 75
<li>Install subversion.
<br />When installing from packages you will need to install the <i>devel</i> packages as well. For example on Fedora/Redhat subversion-devel, apr-devel, apr-util-devel and their dependancies.</li>
76
<li>Get the pysvn source code</li>
77
<li>For Python 2 or Python 3 builds: <code>tar xzf pycxx-6.2.4.tar.gz</code> into <em>extdir</em>/Import if not using a source kit</li>
78
<li><code>cd Source</code></li>
79
<li>For Python 2.6 or earlier builds: backport the PySVN code using <code>python setup.py backport</code></li>
80 81 82 83
<li>Create the Makefile using <code>python setup.py configure</code></li>
<li><code>make</code></li>
<li><code>cd Tests</code></li>
<li>Test pysvn by running <code>make</code></li>
84 85
</ol>

86 87 88
<p>Install pysvn by copying the following from Extension/Source
to python site-specific directory.</p>
<ul>
89 90
<li><code>mkdir <em>python-libdir</em>/site-packages/pysvn</code></li>
<li><code>cp pysvn/__init__.py <em>python-libdir</em>/site-packages/pysvn</code></li>
91
<li><code>cp pysvn/_pysvn*.so <em>python-libdir</em>/site-packages/pysvn</code></li>
92
</ul>
93 94
</body>
</html>