packages/lang/python/patches/010-disable_modules_and_ssl.patch
pavlov e834eda3ba working python 2.5... no threading, yet.
git-svn-id: svn://svn.openwrt.org/openwrt/packages@7016 3c298f89-4303-0410-b956-a3cf2f4a3e73
2007-04-20 18:18:10 +00:00

38 lines
1.3 KiB
Diff

diff -ruNb Python-2.5.pris/setup.py Python-2.5/setup.py
--- Python-2.5.pris/setup.py 2007-04-19 17:08:06.740765500 -0500
+++ Python-2.5/setup.py 2007-04-19 17:08:23.121789250 -0500
@@ -15,7 +15,14 @@
from distutils.command.install_lib import install_lib
# This global variable is used to hold the list of modules to be disabled.
-disabled_module_list = []
+try:
+ disabled_module_list = os.environ["PYTHON_DISABLE_MODULES"].split()
+except KeyError:
+ disabled_module_list = []
+try:
+ disable_ssl = os.environ["PYTHON_DISABLE_SSL"]
+except KeyError:
+ disable_ssl = 0
def add_dir_to_list(dirlist, dir):
"""Add the directory 'dir' to the list 'dirlist' (at the front) if
@@ -244,6 +251,7 @@
return sys.platform
def detect_modules(self):
+ global disable_ssl
try:
modules_include_dirs = os.environ["PYTHON_MODULES_INCLUDE"].split()
except KeyError:
@@ -538,7 +546,8 @@
] )
if (ssl_incs is not None and
- ssl_libs is not None):
+ ssl_libs is not None and
+ not disable_ssl):
exts.append( Extension('_ssl', ['_ssl.c'],
include_dirs = ssl_incs,
library_dirs = ssl_libs,