diff options
author | Georg Brandl <georg@python.org> | 2007-09-01 07:27:37 (GMT) |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2007-09-01 07:27:37 (GMT) |
commit | 7046e976c061d5902e2e13bcf80a8eea47842b84 (patch) | |
tree | 1b23937d92ca1c75b5570b8f38d824d4ccf81472 /Misc | |
parent | 39afe1e649a91ffc7541cd0681798bfaae8baab3 (diff) | |
download | cpython-7046e976c061d5902e2e13bcf80a8eea47842b84.zip cpython-7046e976c061d5902e2e13bcf80a8eea47842b84.tar.gz cpython-7046e976c061d5902e2e13bcf80a8eea47842b84.tar.bz2 |
Bug #1074: make python-config with Py3k.
Diffstat (limited to 'Misc')
-rw-r--r-- | Misc/python-config.in | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/Misc/python-config.in b/Misc/python-config.in index 9ac4414..47ea669 100644 --- a/Misc/python-config.in +++ b/Misc/python-config.in @@ -5,12 +5,12 @@ import os import getopt from distutils import sysconfig -valid_opts = ['prefix', 'exec-prefix', 'includes', 'libs', 'cflags', +valid_opts = ['prefix', 'exec-prefix', 'includes', 'libs', 'cflags', 'ldflags', 'help'] def exit_with_usage(code=1): - print >>sys.stderr, "Usage: %s [%s]" % (sys.argv[0], - '|'.join('--'+opt for opt in valid_opts)) + print("Usage: {0} [{1}]".format( + sys.argv[0], '|'.join('--'+opt for opt in valid_opts)), file=sys.stderr) sys.exit(code) try: @@ -30,17 +30,17 @@ if opt == '--help': exit_with_usage(0) elif opt == '--prefix': - print sysconfig.PREFIX + print(sysconfig.PREFIX) elif opt == '--exec-prefix': - print sysconfig.EXEC_PREFIX + print(sysconfig.EXEC_PREFIX) elif opt in ('--includes', '--cflags'): 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) + print(' '.join(flags)) elif opt in ('--libs', '--ldflags'): libs = getvar('LIBS').split() + getvar('SYSLIBS').split() @@ -49,5 +49,5 @@ elif opt in ('--libs', '--ldflags'): # shared library in prefix/lib/. if opt == '--ldflags' and not getvar('Py_ENABLE_SHARED'): libs.insert(0, '-L' + getvar('LIBPL')) - print ' '.join(libs) + print(' '.join(libs)) |