
***************************************
INTRODUCTION
***************************************

Several TextTest users are known to be using Red Hat Enterprise Linux and SuSE Linux Enterprise, which come
packaged with Python and PyGTK. This has been very convenient in the past, but in recent times TextTest's required versions
have overtaken the ones bundled with RHEL (and SuSE). Users of RHEL3 can thus not use anything beyond TextTest 3.7
without extra work, and those with RHEL4 cannot go beyond TextTest 3.8. Users of SuSE 10 are stuck with TextTest 3.9.1.
To move forward you need to upgrade Python and/or PyGTK.

Naturally you can simply do this by upgrading in-place the versions that come with the system. This is easy
to do and doesn't need a guide, but in practice system administrators tend not to like doing this sort of 
thing as it's difficult to be totally sure it won't screw up something else in the system. It's therefore 
generally necessary to create Python and PyGTK versions in non-default positions. This process has been 
shown to be a bit fiddly, especially for PyGTK, hence this guide.

This guide is based on what we did to create such a separate installation of Python 2.6, PyGTK 2.16 and GTK+ 2.18 
on our RHEL5 system. Naturally we cannot guarantee that all dependencies are satisfied if you attempt this 
process somewhere else, on some other architechture, or if you choose to use other (newer) versions of the 
libs than we have used. But we hope it is a useful start for those who haven't done this sort of thing before.

A number of the packages depend on each other, so it is probably a good idea to follow the build order 
specified below. 

/ Mattias Grnkvist 2007-05-23
/ Geoff Bache 2010-06-09

***************************************
BUILD INSTRUCTIONS
***************************************

Make sure you have the relevant Python development package installed, python-devel or something like that,
otherwise building against Python won't work.

Let INSTALLATION_DIR be the directory where the installation should end up. Let SOURCE_DIR be the root directory of the build, where we'll untar the packages. Download the following packages from the relevant sites:

atk-1.28.0.tar.gz
cairo-1.8.10.tar.gz
clearlooks-0.6.2.tar.bz2
fontconfig-2.8.0.tar.gz
glib-2.22.5.tar.gz
gtk+-2.18.9.tar.gz
pango-1.26.2.tar.gz
pixman-0.16.6.tar.gz
py2cairo-1.8.10.tar.gz
pygobject-2.20.0.tar.gz
pygtk-2.16.0.tar.gz

Python upgrade
--------------

Building your own separate Python is relatively easy. It's a normal build and install, something like

> tar jxvf Python-2.4.3.tar.bz2
> cd Python-2.4.3
> ./configure --prefix=$INSTALLATION_DIR
> make
> make install

PyGTK.2.16
----------
Build all the PyGTK libraries required as described in pygtk_2.16_build.txt

***************************************
RUN INSTRUCTIONS
***************************************
Now we should have a correct PyGTK built in our INSTALLATION_DIR. All we need now
is to be able to find it when we start TextTest. To this end, we've provided shell
scripts that should be able to fulfil this purpose. They might be more than you need,
but they should be a good start.

Copy "texttest" and "setup_python_gtk.sh" from this directory to the bin directory
of your TextTest installation (../../bin, probably). Edit setup_python_gtk.sh to
set the variables PYTHONBIN and PYGTK_INSTALL_DIR to the required python binary
and the INSTALLATION_DIR you used above. Then make sure everyone runs "texttest"
and not "texttest.py". 
