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.in | 18 +++++++++++++-----
16 3 files changed, 19 insertions(+), 7 deletions(-)
18 Index: b/Makefile.pre.in
19 ===================================================================
23 logging bsddb csv importlib wsgiref \
24 ctypes ctypes/macholib \
25 idlelib idlelib/Icons \
26 - distutils distutils/command $(XMLLIBSUBDIRS) \
27 + distutils distutils/command \
28 multiprocessing multiprocessing/dummy \
31 @@ -1018,6 +1018,10 @@
36 +LIBSUBDIRS += $(XMLLIBSUBDIRS)
39 libinstall: build_all $(srcdir)/Lib/$(PLATDIR) $(srcdir)/Modules/xxmodule.c
40 @for i in $(SCRIPTDIR) $(LIBDEST); \
43 ===================================================================
46 @@ -2298,13 +2298,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)
74 ===================================================================
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"):