============
Installation
============

To run Sumatra you will need Python installed on your machine. If you are running
Linux or OS X, you almost certainly already have it. If you don't have Python,
you can install it from `python.org`_, or install one of the
"value-added" distributions aimed at scientific users of Python: `Enthought`_ or
`Python(x,y)`_.

Sumatra may be downloaded from the `Python Package Index`_ (PyPI) or from the `INCF Software Centre`_.
To install it, first unpack the tar archive::

    $ tar xzf Sumatra-0.2.1.tar.gz
    $ cd Sumatra-0.2.1
    # python setup.py install
    
The last step may need to be run as root, or using sudo.

Alternatively, you can install directly from the Python Package Index::

    $ pip install sumatra

or::

    $ easy_install sumatra

Installing Django
-----------------

If you wish to use the web interface, you will also need to install Django_. On
Linux, you may be able to do this via your package management system: see
http://code.djangoproject.com/wiki/Distributions.

Otherwise, it is very easy to install manually: see
http://docs.djangoproject.com/en/dev/topics/install/#installing-official-release

You will also need to install the `django-tagging`_ package, which may be in
your package management system, otherwise it can be installed from PyPI::

    $ easy_install django-tagging

Installing Python bindings for your version control system
----------------------------------------------------------

Sumatra currently supports Mercurial_, Subversion_, Git_ and Bazaar_.
If you are using Subversion, you will need to install the `pysvn bindings`_.
Since Mercurial and Bazaar are mostly written in Python, just installing the
main Mercurial/Bazaar packages is sufficient. For Git, you need to install the
GitPython_ package.

.. _python.org: http://www.python.org
.. _Django: http://www.djangoproject.com
.. _Mercurial: http://www.selenic.com/mercurial/
.. _Subversion: http://subversion.tigris.org/
.. _Git: http://git-scm.com/
.. _Bazaar: http://bazaar.canonical.com/
.. _`Python Package Index`: http://pypi.python.org/pypi/Sumatra/
.. _`INCF Software Centre`: http://software.incf.org/software/sumatra/download
.. _`django-tagging`: http://pypi.python.org/pypi/django-tagging/
.. _`pysvn bindings`: http://pysvn.tigris.org/project_downloads.html
.. _`GitPython`: http://pypi.python.org/pypi/GitPython/
.. _`Enthought`: http://www.enthought.com/products/epd.php
.. _`Python(x,y)`: http://code.google.com/p/pythonxy/