PageRenderTime 19ms CodeModel.GetById 16ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/packages/lang/Python/patches/Python-2.7.2-003_xcompile_disable_modules_and_ssl-0.1.patch

http://github.com/OpenELEC/OpenELEC.tv
Patch | 38 lines | 34 code | 4 blank | 0 comment | 0 complexity | 93b7fa235d81b2cb9cf8c1cabdd758aa MD5 | raw file
 1diff -Naur Python-2.6.6/setup.py Python-2.6.6.patch/setup.py
 2--- Python-2.6.6/setup.py	2010-11-03 00:17:10.403608974 +0100
 3+++ Python-2.6.6.patch/setup.py	2010-11-03 00:23:31.624025348 +0100
 4@@ -18,7 +18,14 @@
 5 from distutils.spawn import find_executable
 6 
 7 # This global variable is used to hold the list of modules to be disabled.
 8-disabled_module_list = []
 9+try:
10+	disabled_module_list = os.environ["PYTHON_DISABLE_MODULES"].split()
11+except KeyError:
12+	disabled_module_list = []
13+try:
14+	disable_ssl = os.environ["PYTHON_DISABLE_SSL"]
15+except KeyError:
16+	disable_ssl = 0
17 
18 def add_dir_to_list(dirlist, dir):
19     """Add the directory 'dir' to the list 'dirlist' (at the front) if
20@@ -361,6 +368,8 @@
21         return sys.platform
22 
23     def detect_modules(self):
24+        global disable_ssl
25+
26         try:
27             modules_include_dirs = os.environ["PYTHON_MODULES_INCLUDE"].split()
28         except KeyError:
29@@ -714,7 +723,8 @@
30                                      ] )
31 
32         if (ssl_incs is not None and
33-            ssl_libs is not None):
34+            ssl_libs is not None and
35+                     not disable_ssl):
36             exts.append( Extension('_ssl', ['_ssl.c'],
37                                    include_dirs = ssl_incs,
38                                    library_dirs = ssl_libs,