summaryrefslogtreecommitdiffstats
path: root/package/python/python-007-disable-extensions.patch
diff options
context:
space:
mode:
authorPeter Korsgaard <peter@korsgaard.com>2014-02-28 14:30:23 +0100
committerPeter Korsgaard <peter@korsgaard.com>2014-02-28 14:30:23 +0100
commitb108fdcb83d457e5d43298fb93dbfd805d076f24 (patch)
tree7fbd64a13fc915f5cea93708419cb3c6aa1b40ea /package/python/python-007-disable-extensions.patch
parenta6cfaea44e5105cb66e4e797042f64335f5e7c01 (diff)
parent9e40a1005f51d10784db295797ed270a130d79d5 (diff)
downloadbuildroot-b108fdcb83d457e5d43298fb93dbfd805d076f24.tar.gz
buildroot-b108fdcb83d457e5d43298fb93dbfd805d076f24.zip
Merge branch 'next'
Conflicts: Makefile package/dmraid/Config.in package/gdb/Config.in.host package/linux-headers/linux-headers.mk package/python/python.mk package/python3/python3.mk package/rt-tests/Config.in package/sdl/sdl.mk package/systemd/systemd-01-fix-getty-unit.patch package/systemd/systemd-02-fix-page-size.patch package/systemd/systemd-03-uclibc-fix.patch package/udev/Config.in package/udisks/Config.in package/vlc/vlc.mk system/Config.in Quite some merge conflicts, hopefully I didn't screw up anything. Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Diffstat (limited to 'package/python/python-007-disable-extensions.patch')
-rw-r--r--package/python/python-007-disable-extensions.patch60
1 files changed, 60 insertions, 0 deletions
diff --git a/package/python/python-007-disable-extensions.patch b/package/python/python-007-disable-extensions.patch
new file mode 100644
index 0000000000..c03f84cace
--- /dev/null
+++ b/package/python/python-007-disable-extensions.patch
@@ -0,0 +1,60 @@
+Index: b/Makefile.pre.in
+===================================================================
+--- a/Makefile.pre.in
++++ b/Makefile.pre.in
+@@ -153,6 +153,8 @@
+ # configure script arguments
+ CONFIG_ARGS= @CONFIG_ARGS@
+
++# disabled extensions
++DISABLED_EXTENSIONS= @DISABLED_EXTENSIONS@
+
+ # Subdirectories with code
+ SRCDIRS= @SRCDIRS@
+@@ -464,6 +466,7 @@
+ esac; \
+ $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' \
+ _TCLTK_INCLUDES='$(TCLTK_INCLUDES)' _TCLTK_LIBS='$(TCLTK_LIBS)' \
++ DISABLED_EXTENSIONS="$(DISABLED_EXTENSIONS)" \
+ $(PYTHON_FOR_BUILD) $(srcdir)/setup.py $$quiet build
+
+ # Build static library
+@@ -1154,7 +1157,8 @@
+ # Install the dynamically loadable modules
+ # This goes into $(exec_prefix)
+ sharedinstall: sharedmods
+- $(RUNSHARED) $(PYTHON_FOR_BUILD) $(srcdir)/setup.py install \
++ $(RUNSHARED) DISABLED_EXTENSIONS="$(DISABLED_EXTENSIONS)" \
++ $(PYTHON_FOR_BUILD) $(srcdir)/setup.py install \
+ --prefix=$(prefix) \
+ --install-scripts=$(BINDIR) \
+ --install-platlib=$(DESTSHARED) \
+Index: b/configure.ac
+===================================================================
+--- a/configure.ac
++++ b/configure.ac
+@@ -2275,6 +2275,8 @@
+
+ AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
+
++AC_SUBST(DISABLED_EXTENSIONS)
++
+ # Check for use of the system expat library
+ AC_MSG_CHECKING(for --with-system-expat)
+ AC_ARG_WITH(system_expat,
+Index: b/setup.py
+===================================================================
+--- a/setup.py
++++ b/setup.py
+@@ -33,7 +33,10 @@
+ COMPILED_WITH_PYDEBUG = ('--with-pydebug' in sysconfig.get_config_var("CONFIG_ARGS"))
+
+ # This global variable is used to hold the list of modules to be disabled.
+-disabled_module_list = []
++try:
++ disabled_module_list = sysconfig.get_config_var("DISABLED_EXTENSIONS").split(" ")
++except KeyError:
++ disabled_module_list = list()
+
+ def add_dir_to_list(dirlist, dir):
+ """Add the directory 'dir' to the list 'dirlist' (at the front) if
OpenPOWER on IntegriCloud