How to get python 2.4 to compile on a new Debian
The instructions are for Ubuntu, but the user appociappo's instructions worked like a charm on Debian 7. It contains a patch to setup.py, and flags for the C compiler and loader:
Link - [ubuntu] compile python 2.4 and 2.6 on 12.04 x86_64
Furthermore, if you are using bootstrap.py for e.g. a Plone buildout, this bootstrap.py seems to work: