title: How to compile Python 2.4.6 with ssl, readline and zlib on Debian Lenny
body: <p>I have a virtual Linux box with Debian 7.1 where I need a Python 2.4.6 to reanimate an old Zope installation (in order to update it to Plone 4, of course).</p>
  
  <p>I definitely need <code>ssl</code> support, and when I'm compiling, I want <code>readline</code> as well, of course.  Finally, of course I need <code>zlib</code>, otherwise <code>ez_setup.py</code> etc. won't work; I'm having a hard time to get <code>zlib</code> included.</p>
  
  <p>I downloaded the tarball of Python 2.4.6, enabled <code>ssl</code> in <code>Modules/Setup.dist</code>:</p>
  
  <pre><code>SSL=/usr/local/ssl
  _ssl _ssl.c \
          -DUSE_SSL -I$(SSL)/include -I$(SSL)/include/openssl \
          -L$(SSL)/lib -lssl -lcrypto
  </code></pre>
  
  <p>... and called:</p>
  
  <pre><code>./configure  --prefix=/my/dest/dir --with-zlib
  make
  </code></pre>
  
  <p><code>make</code> gives me some warnings at the end about <code>crypt</code> and <code>nis</code>, but <code>make install</code> doesn't yield any errors.  However, the resulting Python features both <code>readline</code> and <code>ssl</code> support, but no <code>zlib</code>; thus, I can't use <code>ez_setup.py</code> to get setuptools/pip etc.</p>
  
  <p>I tried both to uncomment and re-exclude the line</p>
  
  <pre><code>zlib zlibmodule.c -I$(prefix)/include -L$(exec_prefix)/lib -lz
  </code></pre>
  
  <p>from <code>Setup.dist</code>.</p>
  
  <p>Some system packages which are installed:</p>
  
  <ul>
  <li><code>zlib1g-dev</code></li>
  <li><code>lib32z1-dev</code></li>
  <li><code>libreadline-gplv2-dev</code></li>
  </ul>
  
  <p>Is there anything else I have missed?</p>
  
  <p><strong>Update</strong>, after heaving read <a href="https://stackoverflow.com/a/4047583/1051649">https://stackoverflow.com/a/4047583/1051649</a>:</p>
  
  <p>I did</p>
  
  <pre><code>$ sudo apt-get install zlib1g zlib1g-dev libncurses5-dev libreadline6-dev ncurses-doc
  $ python setup.py clean
  $ ./configure --with-ssl --with-zlib --prefix=...
  $ make
  $ sudo make install
  </code></pre>
  
  <p>The resulting interpreter was not able to execute <code>distribute_setup.py</code>.</p>