2
1

python-010-disable_modules_and_ssl.patch 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637
  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
  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. def add_dir_to_list(dirlist, dir):
  17. """Add the directory 'dir' to the list 'dirlist' (at the front) if
  18. @@ -247,6 +254,7 @@ class PyBuildExt(build_ext):
  19. return sys.platform
  20. def detect_modules(self):
  21. + global disable_ssl
  22. try:
  23. modules_include_dirs = os.environ["PYTHON_MODULES_INCLUDE"].split()
  24. except KeyError:
  25. @@ -468,7 +476,8 @@ class PyBuildExt(build_ext):
  26. ] )
  27. if (ssl_incs is not None and
  28. - ssl_libs is not None):
  29. + ssl_libs is not None and
  30. + not disable_ssl):
  31. exts.append( Extension('_ssl', ['_ssl.c'],
  32. include_dirs = ssl_incs,
  33. library_dirs = ssl_libs,