diff Misc/python-config.in @ 39161:02fa1015cbcc legacy-trunk

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.
author Georg Brandl <georg@python.org>
date Mon, 24 Jul 2006 13:28:57 +0000
parents 5304059e7de3
children 06145fbc7ab9
line wrap: on
line diff
--- a/Misc/python-config.in	Mon Jul 24 12:54:17 2006 +0000
+++ b/Misc/python-config.in	Mon Jul 24 13:28:57 2006 +0000
@@ -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'))