[Python-checkins] cpython (2.7): - Issue #17029: Let h2py search the multiarch system include directory.

matthias.klose python-checkins at python.org
Fri Jan 25 13:21:12 CET 2013


http://hg.python.org/cpython/rev/5981425cc48e
changeset: 81707:5981425cc48e
branch: 2.7
parent: 81703:62f2d3f6015e
user: doko at python.org
date: Fri Jan 25 13:08:27 2013 +0100
summary:
 - Issue #17029: Let h2py search the multiarch system include directory.
files:
 Makefile.pre.in | 4 ++++
 Misc/NEWS | 2 ++
 Tools/scripts/h2py.py | 6 ++++++
 configure | 4 ++++
 configure.ac | 3 +++
 5 files changed, 19 insertions(+), 0 deletions(-)
diff --git a/Makefile.pre.in b/Makefile.pre.in
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
@@ -86,6 +86,9 @@
 # Machine-dependent subdirectories
 MACHDEP=	@MACHDEP@
 
+# Multiarch directory (may be empty)
+MULTIARCH=	@MULTIARCH@
+
 # Install prefix for architecture-independent files
 prefix=		@prefix@
 
@@ -980,6 +983,7 @@
 	export PYTHONPATH; PYTHONPATH="`pwd`/Lib"; \
 	export DYLD_FRAMEWORK_PATH; DYLD_FRAMEWORK_PATH="`pwd`"; \
 	export EXE; EXE="$(BUILDEXE)"; \
+	if [ -n "$(MULTIARCH)" ]; then export MULTIARCH; MULTIARCH=$(MULTIARCH); fi; \
 	cd $(srcdir)/Lib/$(PLATDIR); $(RUNSHARED) ./regen
 
 python-config: $(srcdir)/Misc/python-config.in
diff --git a/Misc/NEWS b/Misc/NEWS
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -706,6 +706,8 @@
 Build
 -----
 
+- Issue #17029: Let h2py search the multiarch system include directory.
+
 - Issue #16953: Fix socket module compilation on platforms with
 HAVE_BROKEN_POLL. Patch by Jeffrey Armstrong.
 
diff --git a/Tools/scripts/h2py.py b/Tools/scripts/h2py.py
--- a/Tools/scripts/h2py.py
+++ b/Tools/scripts/h2py.py
@@ -58,6 +58,12 @@
 raise KeyError
 except KeyError:
 searchdirs=['/usr/include']
+ try:
+ searchdirs.insert(0, os.path.join('/usr/include',
+ os.environ['MULTIARCH']))
+ except KeyError:
+ pass
+
 
 def main():
 global filedict
diff --git a/configure b/configure
--- a/configure
+++ b/configure
@@ -686,6 +686,7 @@
 EGREP
 GREP
 CPP
+MULTIARCH
 MAINCC
 CXX
 OBJEXT
@@ -4281,6 +4282,9 @@
 " >&2;}
 fi
 
+MULTIARCH=$($CC --print-multiarch 2>/dev/null)
+
+
 
 # checks for UNIX variants that set C preprocessor variables
 
diff --git a/configure.ac b/configure.ac
--- a/configure.ac
+++ b/configure.ac
@@ -603,6 +603,9 @@
 ])
 fi
 
+MULTIARCH=$($CC --print-multiarch 2>/dev/null)
+AC_SUBST(MULTIARCH)
+
 
 # checks for UNIX variants that set C preprocessor variables
 AC_USE_SYSTEM_EXTENSIONS
-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /