summaryrefslogtreecommitdiffstats
path: root/Misc
diff options
context:
space:
mode:
authorCollin Winter <collinw@gmail.com>2010-04-06 21:30:42 (GMT)
committerCollin Winter <collinw@gmail.com>2010-04-06 21:30:42 (GMT)
commit670917769197c0561e94c59b95df86525d834eb7 (patch)
tree49e59e98b819880afd15afb6691c588720628e8e /Misc
parent603b7535cc5718b60ba0c9974d44c5cf6473e2f3 (diff)
downloadcpython-670917769197c0561e94c59b95df86525d834eb7.zip
cpython-670917769197c0561e94c59b95df86525d834eb7.tar.gz
cpython-670917769197c0561e94c59b95df86525d834eb7.tar.bz2
Fix python-config to use the new sysconfig module; silences deprecation warnings.
Diffstat (limited to 'Misc')
-rw-r--r--Misc/python-config.in14
1 files 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))