logrotate: enable selinux support
[buildroot-gz.git] / package / python / 007-disable-extensions.patch
blob9365cb1f5b3438ebda316e0d725b94d27bacfcfa
1 Index: b/Makefile.pre.in
2 ===================================================================
3 --- a/Makefile.pre.in
4 +++ b/Makefile.pre.in
5 @@ -156,6 +156,8 @@
6 # configure script arguments
7 CONFIG_ARGS= @CONFIG_ARGS@
9 +# disabled extensions
10 +DISABLED_EXTENSIONS= @DISABLED_EXTENSIONS@
12 # Subdirectories with code
13 SRCDIRS= @SRCDIRS@
14 @@ -477,6 +479,7 @@
15 esac; \
16 $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' \
17 _TCLTK_INCLUDES='$(TCLTK_INCLUDES)' _TCLTK_LIBS='$(TCLTK_LIBS)' \
18 + DISABLED_EXTENSIONS="$(DISABLED_EXTENSIONS)" \
19 $(PYTHON_FOR_BUILD) $(srcdir)/setup.py $$quiet build
21 # Build static library
22 @@ -1191,7 +1194,8 @@
23 # Install the dynamically loadable modules
24 # This goes into $(exec_prefix)
25 sharedinstall: sharedmods
26 - $(RUNSHARED) $(PYTHON_FOR_BUILD) $(srcdir)/setup.py install \
27 + $(RUNSHARED) DISABLED_EXTENSIONS="$(DISABLED_EXTENSIONS)" \
28 + $(PYTHON_FOR_BUILD) $(srcdir)/setup.py install \
29 --prefix=$(prefix) \
30 --install-scripts=$(BINDIR) \
31 --install-platlib=$(DESTSHARED) \
32 Index: b/configure.ac
33 ===================================================================
34 --- a/configure.ac
35 +++ b/configure.ac
36 @@ -2290,6 +2290,8 @@
38 PKG_PROG_PKG_CONFIG
40 +AC_SUBST(DISABLED_EXTENSIONS)
42 # Check for use of the system expat library
43 AC_MSG_CHECKING(for --with-system-expat)
44 AC_ARG_WITH(system_expat,
45 Index: b/setup.py
46 ===================================================================
47 --- a/setup.py
48 +++ b/setup.py
49 @@ -33,7 +33,10 @@
50 COMPILED_WITH_PYDEBUG = ('--with-pydebug' in sysconfig.get_config_var("CONFIG_ARGS"))
52 # This global variable is used to hold the list of modules to be disabled.
53 -disabled_module_list = []
54 +try:
55 + disabled_module_list = sysconfig.get_config_var("DISABLED_EXTENSIONS").split(" ")
56 +except KeyError:
57 + disabled_module_list = list()
59 def add_dir_to_list(dirlist, dir):
60 """Add the directory 'dir' to the list 'dirlist' (at the front) if