[Python-checkins] r79865 - in python/branches/py3k-jit: Misc/python-config.in

collin.winter python-checkins at python.org
Tue Apr 6 23:34:05 CEST 2010


Author: collin.winter
Date: Tue Apr  6 23:34:03 2010
New Revision: 79865

Log:
Merged revisions 79864 via svnmerge from 
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r79864 | collin.winter | 2010-04-06 14:30:42 -0700 (Tue, 06 Apr 2010) | 1 line
  
  Fix python-config to use the new sysconfig module; silences deprecation warnings.
........


Modified:
   python/branches/py3k-jit/   (props changed)
   python/branches/py3k-jit/Misc/python-config.in

Modified: python/branches/py3k-jit/Misc/python-config.in
==============================================================================
--- python/branches/py3k-jit/Misc/python-config.in	(original)
+++ python/branches/py3k-jit/Misc/python-config.in	Tue Apr  6 23:34:03 2010
@@ -1,9 +1,9 @@
 #!@EXENAME@
 
-import sys
-import os
 import getopt
-from distutils import sysconfig
+import os
+import sys
+import sysconfig
 
 valid_opts = ['prefix', 'exec-prefix', 'includes', 'libs', 'cflags',
               'ldflags', 'help']
@@ -31,14 +31,14 @@
 
 for opt in opt_flags:
     if opt == '--prefix':
-        print(sysconfig.PREFIX)
+        print(sysconfig.get_config_var('prefix'))
 
     elif opt == '--exec-prefix':
-        print(sysconfig.EXEC_PREFIX)
+        print(sysconfig.get_config_var('exec_prefix'))
 
     elif opt in ('--includes', '--cflags'):
-        flags = ['-I' + sysconfig.get_python_inc(),
-                 '-I' + sysconfig.get_python_inc(plat_specific=True)]
+        flags = ['-I' + sysconfig.get_path('include'),
+                 '-I' + sysconfig.get_path('platinclude')]
         if opt == '--cflags':
             flags.extend(getvar('CFLAGS').split())
         print(' '.join(flags))


More information about the Python-checkins mailing list