Veusz Installation
==================

1. INSTALLING FROM SOURCE
*************************

Veusz uses distutils for its installation. See below for how to use it.

Requirements:
 python >= 2.4   http://www.python.org/
 PyQt >= 4.3     http://www.riverbankcomputing.co.uk/software/pyqt/
 numpy >= 1.0    http://numpy.scipy.org/

PyQt requires
 Qt4             http://www.trolltech.com/products/qt/ (free version)
                 version >= 4.4 recommended
 SIP             http://www.riverbankcomputing.co.uk/software/sip/

Optional requirements:
 PyFITS>=1.1     http://www.stsci.edu/resources/software_hardware/pyfits
 pyemf >= 2.0.0  http://pyemf.sourceforge.net/
 PyMinuit        http://code.google.com/p/pyminuit/
 dbus-python     http://dbus.freedesktop.org/doc/dbus-python/

1.1 Full installation with distutils
====================================
There are a number of ways to install programs using distutils. I will
list a few of the possible method here:

To install on linux to the standard location on the hard disk

# cd veusz-1.15
# python setup.py build
# su
[enter root password]
# python setup.py install 
# exit

If you do not have a root account (as is default on Ubuntu), do
# sudo python setup.py install
instead of the final three lines

On Windows, it should just be a matter of running the python setup.py
build and install steps with the requirements installed.

1.2 Testing
===========
After veusz has been installed into the Python path (in the standard
location or in PYTHONPATH), you can run the runselftest.py executable
in the tests directory. This will compare the generated output of
example documents with the expected output. The return code of the
runselftest.py script is the number of tests that have failed (0 for
success).

On Unix/Linux, Qt requires the DISPLAY environment to be set to an X11
server for the self test to run. In a non graphical environment Xvfb
can be used to create a hidden X11 server:
# xvfb-run -a --server-args "-screen 0 640x480x24" \
    python tests/runselftest.py

1.3 Simple source use (if requirements installed)
=================================================
If you don't want to bother installing veusz fully, it can be run from
its own directory (at the moment). Simply do:

# tar xzf veusz-1.15.tar.gz                [change version here]
# cd veusz-1.15
# ./veusz_main.py

Certain features will be disabled if you do this. You will not be able
to do contour plotting. Plotting will be much slower and export file
sizes can be larger.

You can build support without installing by doing:

# python setup.py build
# cp build/*/veusz/helpers/*.so helpers/

2. BINARY INSTALL
*****************

2.1 Linux binary
================
If your distribution does not include an up to date package, you can
use the Linux binary instead (for i386/x86_64). Note that this may not
work on all distributions due to glibc/library
incompatibilities. Simply unpack the tar file and run the main
executable:

# tar xzf veusz-linux-i386-1.15.tar.gz     [change version here]
# cd veusz-linux-i386-1.15
# ./veusz

2.2 Installing in Windows
=========================
Simply run the setup.exe binary installer. Add the location of the
embed.py file to your PYTHONPATH if you want to use the embedding
module.

2.3 Installing on Mac OS X
==========================
A binary is available for Mac OS X. Simply drag the Veusz application
into your Applications directory.

3. NOTES FOR PACKAGERS
**********************
- It is recommended to run the self test above (if possible)
- The --veusz-resource-dir allows the packager to move veusz's
  resource data files outside of the python path, e.g. into
  LFS /usr/share/veusz. This option installs the resource
  files into this direction. The packager should use a symlink
  "resources" in the veusz directory to point to this location.
- The --disable-install-examples option prevents installing the
  examples, so that they can be installed by the packager into e.g.
  /usr/share/doc/veusz/examples. Veusz looks for the examples
  directory in the resource directory for the examples, to make
  its examples menu. It is recommended to use a symlink to
  point this to the real examples location.
