diff -Naur Python-2.6.6/setup.py Python-2.6.6.patch/setup.py
--- Python-2.6.6/setup.py	2010-11-03 00:17:10.403608974 +0100
+++ Python-2.6.6.patch/setup.py	2010-11-03 00:23:31.624025348 +0100
@@ -18,7 +18,14 @@
 from distutils.spawn import find_executable
 
 # This global variable is used to hold the list of modules to be disabled.
-disabled_module_list = []
+try:
+	disabled_module_list = os.environ["PYTHON_DISABLE_MODULES"].split()
+except KeyError:
+	disabled_module_list = []
+try:
+	disable_ssl = os.environ["PYTHON_DISABLE_SSL"]
+except KeyError:
+	disable_ssl = 0
 
 def add_dir_to_list(dirlist, dir):
     """Add the directory 'dir' to the list 'dirlist' (at the front) if
@@ -361,6 +368,8 @@
         return sys.platform
 
     def detect_modules(self):
+        global disable_ssl
+
         try:
             modules_include_dirs = os.environ["PYTHON_MODULES_INCLUDE"].split()
         except KeyError:
@@ -714,7 +723,8 @@
                                      ] )
 
         if (ssl_incs is not None and
-            ssl_libs is not None):
+            ssl_libs is not None and
+                     not disable_ssl):
             exts.append( Extension('_ssl', ['_ssl.c'],
                                    include_dirs = ssl_incs,
                                    library_dirs = ssl_libs,
