From 670917769197c0561e94c59b95df86525d834eb7 Mon Sep 17 00:00:00 2001 From: Collin Winter Date: Tue, 6 Apr 2010 21:30:42 +0000 Subject: Fix python-config to use the new sysconfig module; silences deprecation warnings. --- Misc/python-config.in | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Misc/python-config.in b/Misc/python-config.in index c03b4fa..2660574 100644 --- a/Misc/python-config.in +++ b/Misc/python-config.in @@ -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 @@ if '--help' in opt_flags: 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)) -- cgit v0.12