1 Add an option to disable expat
3 This patch replaces the existing --with-system-expat option with a
4 --with-expat={system,builtin,none} option, which allows to tell Python
5 whether we want to use the system expat (already installed), the expat
6 builtin the Python sources, or no expat at all (which disables the
7 installation of XML modules).
9 Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
10 Signed-off-by: Samuel Martin <s.martin49@gmail.com>
13 Makefile.pre.in | 6 +++++-
14 configure.ac | 18 +++++++++++++-----
16 3 files changed, 19 insertions(+), 7 deletions(-)
18 Index: cpython/Makefile.pre.in
19 ===================================================================
20 --- cpython.orig/Makefile.pre.in
21 +++ cpython/Makefile.pre.in
23 html json http dbm xmlrpc \
24 logging csv wsgiref urllib \
25 ctypes ctypes/macholib idlelib idlelib/Icons \
26 - distutils distutils/command $(XMLLIBSUBDIRS) \
27 + distutils distutils/command \
30 multiprocessing multiprocessing/dummy \
31 @@ -1065,6 +1065,10 @@
36 +LIBSUBDIRS += $(XMLLIBSUBDIRS)
39 libinstall: build_all $(srcdir)/Lib/$(PLATDIR) $(srcdir)/Modules/xxmodule.c
40 @for i in $(SCRIPTDIR) $(LIBDEST); \
42 Index: cpython/configure.ac
43 ===================================================================
44 --- cpython.orig/configure.ac
45 +++ cpython/configure.ac
46 @@ -2178,13 +2178,21 @@
47 AC_SUBST(DISABLED_EXTENSIONS)
49 # Check for use of the system expat library
50 -AC_MSG_CHECKING(for --with-system-expat)
51 -AC_ARG_WITH(system_expat,
52 - AS_HELP_STRING([--with-system-expat], [build pyexpat module using an installed expat library]),
53 +AC_MSG_CHECKING(for --with-expat)
55 + AS_HELP_STRING([--with-expat], [select which expat version to use: system, builtin, none]),
57 - [with_system_expat="no"])
58 + [with_expat="builtin"])
60 -AC_MSG_RESULT($with_system_expat)
61 +AC_MSG_RESULT($with_expat)
63 +if test "$with_expat" != "none"; then
66 + DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} pyexpat"
71 # Check for use of the system libffi library
72 AC_MSG_CHECKING(for --with-system-ffi)
73 Index: cpython/setup.py
74 ===================================================================
75 --- cpython.orig/setup.py
79 # More information on Expat can be found at www.libexpat.org.
81 - if '--with-system-expat' in sysconfig.get_config_var("CONFIG_ARGS"):
82 + if '--with-expat=system' in sysconfig.get_config_var("CONFIG_ARGS"):