collective/collective.hostout — Issue #29: Compiled python lacks zlib 
Author: jean
Created: 2012-02-28 09:16:43+00:00
State: open

I had to edit `Python-2.4/Modules/Setup` before zlib support was finally compiled successfully:

--- Python-2.4/Modules/Setup 2012-02-28 09:11:10.313091762 +0000
+++ Python-2.4-with-zlib/Modules/Setup 2012-02-28 08:52:28.121091224 +0000
@@ -443,6 +443,7 @@
# This require zlib 1.1.3 (or later).
# See http://www.gzip.org/zlib/
#zlib zlibmodule.c -I$(prefix)/include -L$(exec_prefix)/lib -lz
+zlib zlibmodule.c -I$(prefix)/include -L$(exec_prefix)/lib -lz

Use https://github.com/collective/buildout.python to do the compilation instead?