[Python-checkins] r50800 - in python/trunk: Makefile.pre.in Misc/python-config.in

georg.brandl python-checkins at python.org
Mon Jul 24 15:28:57 CEST 2006


Author: georg.brandl
Date: Mon Jul 24 15:28:57 2006
New Revision: 50800

Modified:
   python/trunk/Makefile.pre.in
   python/trunk/Misc/python-config.in
Log:
Patch #1523356: fix determining include dirs in python-config.

Also don't install "python-config" when doing altinstall, but
always install "python-config2.x" and make a link to it like
with the main executable.



Modified: python/trunk/Makefile.pre.in
==============================================================================
--- python/trunk/Makefile.pre.in	(original)
+++ python/trunk/Makefile.pre.in	Mon Jul 24 15:28:57 2006
@@ -649,6 +649,7 @@
 	else true; \
 	fi
 	(cd $(DESTDIR)$(BINDIR); $(LN) python$(VERSION)$(EXE) $(PYTHON))
+	(cd $(DESTDIR)$(BINDIR); $(LN) -sf python-config$(VERSION)$(EXE) python-config$(EXE))
 
 # Install the interpreter with $(VERSION) affixed
 # This goes into $(exec_prefix)
@@ -849,8 +850,8 @@
 	$(INSTALL_SCRIPT) $(srcdir)/install-sh $(DESTDIR)$(LIBPL)/install-sh
 	# Substitution happens here, as the completely-expanded BINDIR
 	# is not available in configure
-	sed -e "s, at BINDIR@,$(BINDIR)," < $(srcdir)/Misc/python-config.in >python-config
-	$(INSTALL_SCRIPT) python-config $(DESTDIR)$(BINDIR)/python-config
+	sed -e "s, at EXENAME@,$(BINDIR)/python$(VERSION)$(EXE)," < $(srcdir)/Misc/python-config.in >python-config
+	$(INSTALL_SCRIPT) python-config $(DESTDIR)$(BINDIR)/python-config$(VERSION)$(EXE)
 	rm python-config
 	@if [ -s Modules/python.exp -a \
 		"`echo $(MACHDEP) | sed 's/^\(...\).*/\1/'`" = "aix" ]; then \

Modified: python/trunk/Misc/python-config.in
==============================================================================
--- python/trunk/Misc/python-config.in	(original)
+++ python/trunk/Misc/python-config.in	Mon Jul 24 15:28:57 2006
@@ -1,4 +1,4 @@
-#!@BINDIR@/python
+#!@EXENAME@
 
 import sys
 import os
@@ -36,13 +36,14 @@
     print sysconfig.EXEC_PREFIX
 
 elif opt in ('--includes', '--cflags'):
-    flags = ['-I'+dir for dir in getvar('INCLDIRSTOMAKE').split()]
+    flags = ['-I' + sysconfig.get_python_inc(),
+             '-I' + sysconfig.get_python_inc(plat_specific=True)]
     if opt == '--cflags':
         flags.extend(getvar('CFLAGS').split())
     print ' '.join(flags)
 
 elif opt in ('--libs', '--ldflags'):
-    libs = sysconfig.get_config_var('LIBS').split()
+    libs = getvar('LIBS').split() + getvar('SYSLIBS').split()
     libs.append('-lpython'+pyver)
     if opt == '--ldflags':
         libs.insert(0, '-L' + getvar('LIBPL'))


More information about the Python-checkins mailing list