Reference: Modern pyGTK+ stack on RHEL 5

Certain software projects like to target “enterprise”-class Linux distributions that have super old versions of certain key pieces of software. If, for instance, you want to actually use a somewhat modern GTK+ from Python, here’s the ordered list of dependencies that you’ll need to install:

  1. Python >= 2.6. (Versus the 2004-vintage Python 2.4 that comes by default on RHEL 5.) CASA bundles Python 2.6.5 and you need to use its Python to get its special libraries, so use that.

  2. libffi 3.0.11

  3. glib 2.34.2

  4. pixman 0.28.0

  5. cairo 1.12.6

  6. gobject-introspection 1.34.2

  7. gdk-pixbuf 2.26.5

  8. freetype 2.4.10

  9. harfbuzz 0.9.6

  10. fontconfig 2.10.1

  11. pango 1.32.2

  12. atk 2.6.0

  13. gtk+ 2.24.13

  14. pygobject 2.28.6 with this patch and this optional one.

  15. py2cairo 1.10.0 — uses “waf” build tool that may require the futzing mentioned at the end of this thread

  16. pygtk 2.24.0

Obviously, somewhat different versions are probably OK, though too-new stuff probably targets Python 3 and GTK+ 3 and opens a huge can of worms if your code is targeting version 2 of each of those.

Building everything is tedious but not generally difficult, though there isn’t much documentation about how to pass extra info to waf if it can’t guess the right flags for things.