pySvnManager Installation
Prerequisite
You may need the following packages. Some of them are will be automatically installed with pySvnManager.
- Pylons:
- A must have package, and it will be installed automatically.
- Different version of pySvnManager depends on different version of Pylons. It is because Pylons itself is under rapidly develop, and back compatibility may not it's current option.
- pySvnManager 0.3 depends on Pylons 0.9.7;
- pySvnManager 0.2 depends on Pylons 0.9.6.2;
- RCS software package:
- RCS is single file revision control tool (ancestor of CVS). We use ci/co to backup/restore SVN authz files.
- RCS can not be automatically install by easy_install,
so install it by hands. For Debian Linux, using command:
$ sudo apt-get install rcs
- Python docutils:
- Use docutils to transform reST format to html. Hooks plugin descriptions are reST format.
- Python-ldap:
- pySvnManager default using htpasswd file for authentication.
- There are other auth plugins such as ldap authentication. But before enable ldap auth plugin, must install python-ldap manually.
- Install pythong-ldap using command:
$ sudo easy_install python-ldap
- Babel: Used for i18n messages extraction and translation. If build pySvnManager from source, you need it.
Installation
Install using easy_install
It is very simple to install python packages using easy_install.
$ easy_install pySvnManager
Behind easy_install:
- First, easy_install try to find the best revision from index page of PYPI (http://pypi.python.org), also reference to homepage of this site. Then download the package which the most recent revision.
- Easy_install try to download and install binary package (*.egg) first. Egg package is binary package for specific python revision. If your python version is too high or too low, and there is no matched binary egg package, easy_install will try to download and use source package (*.tar.gz) for installation.
Install from subversion source tree
- Checkout souce code from pySvnManager subversion:
$ svn co https://pysvnmanager.svn.sourceforge.net/svnroot/pysvnmanager/trunk workingcopy
- Compile i18n messages:
$ cd workingcopy $ python setup.py compile_catalog
- Runing install:
$ python setup.py install
Configuration
After installation, pySvnManager is installed at /usr/lib/python2.X/site-packages/pySvnManager-<revision>-py2.X.egg.
Next we will deploy a pySvnManager instance.
Create a pySvnManager instance
~$ mkdir deploy ~$ cd deploy ~/deploy$ paster make-config pySvnManager config.ini Distribution already installed: pySvnManager 0.3.0dev-r55 from /usr/lib/python2.5/site-packages/pySvnManager-0.3.0dev_r55-py2.5.egg Creating config.ini Now you should edit the config files config.ini
Setup an instance
~/deploy$ paster setup-app config.ini Running setup_config() from pysvnmanager.websetup ~/deploy$ ls -F config/ config.ini svnroot/ ~/deploy$ ls -F config localconfig.py RCS/ svn.access svn.passwd
Default configuration files
File: config/svn.passwd and config/localconfig.py
File 'config/svn.passwd' is a htpasswd file, which pySvnManager auth against.
There are some user:passwd entries already in it. They are mainly for unit test. You can remove them all add add new passwd entry using command:
~/deploy$ htpasswd -b config/svn.passwd yourname yourpasswd
Authentication method for pySvnManager is defined in 'config/localconfig.py'. Default using password file based login.
from pysvnmanager.model.auth.http import htpasswd_login
auth = [htpasswd_login
Password file for pySvnManager is defined in 'config.ini':
# authn_file: a .htpasswd style password file, used for pysvnmanager authentication. authn_file = %(here)s/config/svn.passwd
File: config/svn.access
Subversion server's path-based authorization file. The default localtion is 'config/svn.access'. You should change the location to what subversion server really used.
Location for this file is defined in 'config.ini':
# authz_file: svn authz config file with administrative extension. (ossxp.com) authz_file = %(here)s/config/svn.access
pySvnAuthz also use this file for authentication. Add your name at the beginning of the file, and make yourself a superman.
# admin : / = YourName
Directory: svnroot
Directory svnroot is your Subversion repository root directory. In most case you should point it to the real svn repos root.
To change the svnroot location, modify file 'config.ini':
# svn repository root path repos_root = %(here)s/svnroot
Start pySvnManager
In the pySvnManager instance directory, start the web application:
~/deploy$ paster serve config.ini Starting server in PID 9928. serving on 0.0.0.0:5000 view at http://127.0.0.1:5000
Now, open a web browser (Firefox is recommended), open link to http://localhost:5000 .
![(please configure the [header_logo] section in trac.ini)](/trac/pysvnmanager/chrome/common/trac_banner.png)