don't fail if BR2_USE_UPDATES tries to update non-checkout
[buildroot.git] / package / python / python-010-disable_modules_and_ssl.patch
bloba690eae38d36e6e94f9646ae62030cf124d48c13
1 diff -rduNp Python-2.4.2-002/setup.py Python-2.4.2/setup.py
2 --- Python-2.4.2-002/setup.py 2007-01-22 19:41:47.000000000 +0100
3 +++ Python-2.4.2/setup.py 2007-01-22 19:47:25.000000000 +0100
4 @@ -15,7 +15,14 @@ from distutils.command.install import in
5 from distutils.command.install_lib import install_lib
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
18 def add_dir_to_list(dirlist, dir):
19 """Add the directory 'dir' to the list 'dirlist' (at the front) if
20 @@ -247,6 +254,7 @@ class PyBuildExt(build_ext):
21 return sys.platform
23 def detect_modules(self):
24 + global disable_ssl
25 try:
26 modules_include_dirs = os.environ["PYTHON_MODULES_INCLUDE"].split()
27 except KeyError:
28 @@ -468,7 +476,8 @@ class PyBuildExt(build_ext):
29 ] )
31 if (ssl_incs is not None and
32 - ssl_libs is not None):
33 + ssl_libs is not None and
34 + not disable_ssl):
35 exts.append( Extension('_ssl', ['_ssl.c'],
36 include_dirs = ssl_incs,
37 library_dirs = ssl_libs,