[Python-checkins] r77170 - in python/branches/py3k: Misc/NEWS configure configure.in setup.py
benjamin.peterson
python-checkins at python.org
Thu Dec 31 04:23:11 CET 2009
Author: benjamin.peterson
Date: Thu Dec 31 04:23:10 2009
New Revision: 77170
Log:
Merged revisions 77169 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r77169 | benjamin.peterson | 2009-12-30 21:17:18 -0600 (Wed, 30 Dec 2009) | 2 lines
add a --with-system-expat option to build pyexpat against the system's lib #7609
........
Modified:
python/branches/py3k/ (props changed)
python/branches/py3k/Misc/NEWS
python/branches/py3k/configure
python/branches/py3k/configure.in
python/branches/py3k/setup.py
Modified: python/branches/py3k/Misc/NEWS
==============================================================================
--- python/branches/py3k/Misc/NEWS (original)
+++ python/branches/py3k/Misc/NEWS Thu Dec 31 04:23:10 2009
@@ -514,6 +514,10 @@
Build
-----
+- Issue #7609: Add a --with-system-expat option that causes the system's expat
+ library to be used for the pyexpat module instead of the one included with
+ Python.
+
- Issue #7589: Only build the nis module when the correct header files are
found.
Modified: python/branches/py3k/configure
==============================================================================
--- python/branches/py3k/configure (original)
+++ python/branches/py3k/configure Thu Dec 31 04:23:10 2009
@@ -1,5 +1,5 @@
#! /bin/sh
-# From configure.in Revision: 76815 .
+# From configure.in Revision: 77032 .
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.61 for python 3.2.
#
@@ -1342,6 +1342,8 @@
--with-suffix=.exe set executable suffix
--with-pydebug build with Py_DEBUG defined
--with-libs='lib1 ...' link against additional libs
+ --with-system-expat build pyexpat module using an installed expat
+ library
--with-system-ffi build _ctypes module using an installed ffi library
--with-dbmliborder=db1:db2:...
order to check db backends for dbm. Valid value is a
@@ -3792,7 +3794,7 @@
{ echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi
-rm -f -r conftest*
+rm -f conftest*
@@ -5335,7 +5337,7 @@
else
ac_cv_header_stdc=no
fi
-rm -f -r conftest*
+rm -f conftest*
fi
@@ -5356,7 +5358,7 @@
else
ac_cv_header_stdc=no
fi
-rm -f -r conftest*
+rm -f conftest*
fi
@@ -6454,7 +6456,7 @@
fi
-rm -f -r conftest*
+rm -f conftest*
{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
echo "${ECHO_T}$was_it_defined" >&6; }
@@ -6984,7 +6986,7 @@
else
ac_cv_type_uid_t=no
fi
-rm -f -r conftest*
+rm -f conftest*
fi
{ echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
@@ -15320,6 +15322,19 @@
fi
+# Check for use of the system expat library
+{ echo "$as_me:$LINENO: checking for --with-system-expat" >&5
+echo $ECHO_N "checking for --with-system-expat... $ECHO_C" >&6; }
+
+# Check whether --with-system_expat was given.
+if test "${with_system_expat+set}" = set; then
+ withval=$with_system_expat;
+fi
+
+
+{ echo "$as_me:$LINENO: result: $with_system_expat" >&5
+echo "${ECHO_T}$with_system_expat" >&6; }
+
# Check for use of the system libffi library
{ echo "$as_me:$LINENO: checking for --with-system-ffi" >&5
echo $ECHO_N "checking for --with-system-ffi... $ECHO_C" >&6; }
@@ -15526,7 +15541,7 @@
else
unistd_defines_pthreads=no
fi
-rm -f -r conftest*
+rm -f conftest*
{ echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
echo "${ECHO_T}$unistd_defines_pthreads" >&6; }
@@ -16824,7 +16839,7 @@
$EGREP "yes" >/dev/null 2>&1; then
ipv6type=$i
fi
-rm -f -r conftest*
+rm -f conftest*
;;
kame)
@@ -16847,7 +16862,7 @@
ipv6libdir=/usr/local/v6/lib
ipv6trylibc=yes
fi
-rm -f -r conftest*
+rm -f conftest*
;;
linux-glibc)
@@ -16868,7 +16883,7 @@
ipv6type=$i;
ipv6trylibc=yes
fi
-rm -f -r conftest*
+rm -f conftest*
;;
linux-inet6)
@@ -16906,7 +16921,7 @@
ipv6lib=inet6;
ipv6libdir=/usr/local/v6/lib
fi
-rm -f -r conftest*
+rm -f conftest*
;;
v6d)
@@ -16929,7 +16944,7 @@
ipv6libdir=/usr/local/v6/lib;
BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
fi
-rm -f -r conftest*
+rm -f conftest*
;;
zeta)
@@ -16951,7 +16966,7 @@
ipv6lib=inet6;
ipv6libdir=/usr/local/v6/lib
fi
-rm -f -r conftest*
+rm -f conftest*
;;
esac
@@ -25292,7 +25307,7 @@
_ACEOF
fi
-rm -f -r conftest*
+rm -f conftest*
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
@@ -25311,7 +25326,7 @@
_ACEOF
fi
-rm -f -r conftest*
+rm -f conftest*
fi
@@ -25581,7 +25596,7 @@
_ACEOF
fi
-rm -f -r conftest*
+rm -f conftest*
fi
Modified: python/branches/py3k/configure.in
==============================================================================
--- python/branches/py3k/configure.in (original)
+++ python/branches/py3k/configure.in Thu Dec 31 04:23:10 2009
@@ -1856,6 +1856,13 @@
],
[AC_MSG_RESULT(no)])
+# Check for use of the system expat library
+AC_MSG_CHECKING(for --with-system-expat)
+AC_ARG_WITH(system_expat,
+ AC_HELP_STRING(--with-system-expat, build pyexpat module using an installed expat library))
+
+AC_MSG_RESULT($with_system_expat)
+
# Check for use of the system libffi library
AC_MSG_CHECKING(for --with-system-ffi)
AC_ARG_WITH(system_ffi,
Modified: python/branches/py3k/setup.py
==============================================================================
--- python/branches/py3k/setup.py (original)
+++ python/branches/py3k/setup.py Thu Dec 31 04:23:10 2009
@@ -1104,19 +1104,26 @@
#
# More information on Expat can be found at www.libexpat.org.
#
- expatinc = os.path.join(os.getcwd(), srcdir, 'Modules', 'expat')
- define_macros = [
- ('HAVE_EXPAT_CONFIG_H', '1'),
- ]
+ if '--with-system-expat' in sysconfig.get_config_var("CONFIG_ARGS"):
+ expat_inc = []
+ define_macros = []
+ expat_lib = ['expat']
+ expat_sources = []
+ else:
+ expat_inc = [os.path.join(os.getcwd(), srcdir, 'Modules', 'expat')]
+ define_macros = [
+ ('HAVE_EXPAT_CONFIG_H', '1'),
+ ]
+ expat_lib = []
+ expat_sources = ['expat/xmlparse.c',
+ 'expat/xmlrole.c',
+ 'expat/xmltok.c']
exts.append(Extension('pyexpat',
define_macros = define_macros,
- include_dirs = [expatinc],
- sources = ['pyexpat.c',
- 'expat/xmlparse.c',
- 'expat/xmlrole.c',
- 'expat/xmltok.c',
- ],
+ include_dirs = expat_inc,
+ libraries = expat_lib,
+ sources = ['pyexpat.c'] + expat_sources
))
# Fredrik Lundh's cElementTree module. Note that this also
@@ -1126,7 +1133,8 @@
define_macros.append(('USE_PYEXPAT_CAPI', None))
exts.append(Extension('_elementtree',
define_macros = define_macros,
- include_dirs = [expatinc],
+ include_dirs = expat_inc,
+ libraries = expat_lib,
sources = ['_elementtree.c'],
))
else:
More information about the Python-checkins
mailing list