Tcl build fix
[gumsense-br.git] / package / python / python-disable_modules_and_ssl.patch
blob073296c5f9930fb6bf608c5280522db72fb4ec61
1 --- python.old/setup.py 2003-11-01 19:23:48.495647848 +0000
2 +++ python/setup.py 2003-11-01 19:24:16.044459792 +0000
3 @@ -15,7 +15,14 @@
4 from distutils.command.install_lib import install_lib
6 # This global variable is used to hold the list of modules to be disabled.
7 -disabled_module_list = []
8 +try:
9 + disabled_module_list = os.environ["PYTHON_DISABLE_MODULES"].split()
10 +except KeyError:
11 + disabled_module_list = []
12 +try:
13 + disable_ssl = os.environ["PYTHON_DISABLE_SSL"]
14 +except KeyError:
15 + disable_ssl = 0
17 def add_dir_to_list(dirlist, dir):
18 """Add the directory 'dir' to the list 'dirlist' (at the front) if
19 @@ -240,6 +247,7 @@
20 return sys.platform
22 def detect_modules(self):
23 + global disable_ssl
24 # Ensure that /usr/local is always used
25 add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
26 add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
27 @@ -451,7 +459,8 @@
28 ] )
30 if (ssl_incs is not None and
31 - ssl_libs is not None):
32 + ssl_libs is not None and
33 + not disable_ssl):
34 exts.append( Extension('_ssl', ['_ssl.c'],
35 include_dirs = ssl_incs,
36 library_dirs = ssl_libs,