Magellan Linux

Contents of /trunk/python/patches/python-2.4-disable_modules_and_ssl.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 153 - (show annotations) (download)
Tue May 8 20:52:56 2007 UTC (17 years ago) by niro
File size: 1285 byte(s)
-import

1 --- setup.py.old 2003-11-01 19:23:48.495647848 +0000
2 +++ setup.py 2003-11-01 19:24:16.044459792 +0000
3 @@ -15,7 +15,14 @@
4 from distutils.command.install_lib import install_lib
5
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
16
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
21
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 ] )
29
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,