install python 2.6 on Ubuntu 12.04

Christian Heimes lists at cheimes.de
Wed May 23 03:49:23 EDT 2012


Am 23.05.2012 09:40, schrieb Christian Heimes:
> You recall correctly. That's the recommended and correct way to install
> Python 2.6 on a recent machine, with one exception. You must compile it
> with the option MACHDEP=linux2, otherwise sys.platform will contain the
> string "linux3" [1]. You also must set LDFLAGS and some other flags
> because Python 2.6 doesn't support multiarch systems. [2] It's all in my
> blog.

I almost forgot, you have to patch the _ssl module, too.

diff --git a/Modules/_ssl.c b/Modules/_ssl.c
--- a/Modules/_ssl.c
+++ b/Modules/_ssl.c
@@ -302,8 +302,10 @@
         self->ctx = SSL_CTX_new(TLSv1_method()); /* Set up context */
     else if (proto_version == PY_SSL_VERSION_SSL3)
         self->ctx = SSL_CTX_new(SSLv3_method()); /* Set up context */
+#ifndef OPENSSL_NO_SSL2
     else if (proto_version == PY_SSL_VERSION_SSL2)
         self->ctx = SSL_CTX_new(SSLv2_method()); /* Set up context */
+#endif
     else if (proto_version == PY_SSL_VERSION_SSL23)
         self->ctx = SSL_CTX_new(SSLv23_method()); /* Set up context */
     PySSL_END_ALLOW_THREADS




More information about the Python-list mailing list