From: Georg Brandl Date: Sun, 12 Sep 2010 17:14:26 +0000 (+0000) Subject: 9806: add --extension-suffix option to python-config. X-Git-Tag: v3.2a3~302 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b084b48cec806dbc138c4efee338e422aefe538e;p=thirdparty%2FPython%2Fcpython.git 9806: add --extension-suffix option to python-config. --- diff --git a/Misc/NEWS b/Misc/NEWS index fe8fd5d9b2ff..7b06c69808c4 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -137,6 +137,10 @@ Tools/Demos Build ----- +- Issue #9806: python-config now has an ``--extension-suffix`` option that + outputs the suffix for dynamic libraries including the ABI version name + defined by PEP 3149. + - Issue #941346: Improve the build process under AIX and allow Python to be built as a shared library. Patch by Sébastien Sablé. diff --git a/Misc/python-config.in b/Misc/python-config.in index 26605747f31d..841cdfa07008 100644 --- a/Misc/python-config.in +++ b/Misc/python-config.in @@ -6,7 +6,7 @@ import sys import sysconfig valid_opts = ['prefix', 'exec-prefix', 'includes', 'libs', 'cflags', - 'ldflags', 'help'] + 'ldflags', 'extension-suffix', 'help'] def exit_with_usage(code=1): print("Usage: {0} [{1}]".format( @@ -54,3 +54,5 @@ for opt in opt_flags: libs.extend(getvar('LINKFORSHARED').split()) print(' '.join(libs)) + elif opt == '--extension-suffix': + print(sysconfig.get_config_var('SO'))