.. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
.. % Copyright 2001 by Object Craft P/L, Melbourne, Australia.
.. % LICENCE - see LICENCE file distributed with this software for details.
.. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
.. _inst-guide:
************
Installation
************
If you are using a Linux distribution such as Debian or Ubuntu, you
should use the distribution's Albatross package, ``python-albatross``,
unless you intend to make changes to the Albatross code. Ubuntu users
will need to enable the ``universe`` software source if it isn't already
enabled - under Applications, select Ubuntu Software Center, then select
the Edit menu, and Software Sources.
If you are installing from the source, please read on...
.. _inst-pre:
Prerequisites
=============
Note that, where possible, you should install packages provided by your
distribution, rather than building all the dependancies yourself.
* **Python** 2.3 or later.
`http://www.python.org/ `_
If you wish to regenerate the documentation, you will also need:
* **Sphinx** 0.6.2 or later.
`http://sphinx.pocoo.org/ `_
* **LaTeX**
Only required if you want to build the PDF or PostScript documentation.
On Ubuntu, install the ``texlive`` package (and dependancies).
* **dia**
`http://live.gnome.org/Dia `_
The diagrams in the documentation are edited and rendered to PNG and
EPS format using **dia** version 0.97.
* **GraphViz**
`http://www.graphviz.org/ `_
Used to auto-generate some diagrams.
.. _inst-install:
Installing
==========
Unpack the package archive to extract the package source:
.. code-block:: sh
$ tar xzf albatross-1.42.tar.gz
This will create an ``albatross-1.42`` subdirectory. Inside the
``albatross-1.42`` directory are a number of directories:
* **albatross**
Contains the Python code for the package.
* **doc**
Contains the documentation source.
* **samples**
Contains all of the sample programs discussed in this document.
* **session-server**
Contains a simple session server which works with the Albatross
server-side session mixin classes.
* **test**
Contains the unit tests.
The :mod:`Albatross` package uses the :mod:`distutils` package so all you need
to do is type the following command as root from the top level directory:
.. code-block:: sh
# python setup.py install
If you have problems with this step, make sure that you contact the package
author so that the installation process can be made more robust for other
people.
If you already have a copy of Albatross installed and wish to test the new
release before installing it globally then you can install an application
private copy. If your application is installed in ``/path/to/proj`` then the
following command will install a copy of Albatross that is only visible to that
application:
.. code-block:: sh
$ python setup.py install --install-lib /path/to/proj --install-scripts /path/to/proj
If you wish to build the documentation, run:
.. code-block:: sh
$ cd doc
$ make pdf
Or:
.. code-block:: sh
$ cd doc
$ make html
.. _inst-test:
Testing
=======
There are a number of unit tests included in the distribution. These have been
developed using the :mod:`unittest` package which is standard in Python 2.1 and
later.
Run the following commands to perform the unit tests:
.. code-block:: sh
$ make test
If you want to do more than run the unit tests, you can start to work your way
through the samples which are presented in this document.