From 8cf4eae522592549a92b7b599838f63ba56120cd Mon Sep 17 00:00:00 2001 From: Barry Warsaw Date: Sat, 16 Oct 2010 01:04:07 +0000 Subject: First (uncontroversial) part of issue 9807. * Expose the build flags to Python as sys.abiflags * Shared library libpythonX.Y.so * python-config --abiflags * Make two distutils tests that failed with --enable-shared (even before this patch) succeed. * Fix a few small style issues. --- Lib/distutils/command/build_ext.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Lib/distutils/command/build_ext.py') diff --git a/Lib/distutils/command/build_ext.py b/Lib/distutils/command/build_ext.py index 4e664642b8..cc0d414cf9 100644 --- a/Lib/distutils/command/build_ext.py +++ b/Lib/distutils/command/build_ext.py @@ -754,9 +754,9 @@ class build_ext(Command): else: from distutils import sysconfig if sysconfig.get_config_var('Py_ENABLE_SHARED'): - template = "python%d.%d" - pythonlib = (template % - (sys.hexversion >> 24, (sys.hexversion >> 16) & 0xff)) + pythonlib = 'python{}.{}{}'.format( + sys.hexversion >> 24, (sys.hexversion >> 16) & 0xff, + sys.abiflags) return ext.libraries + [pythonlib] else: return ext.libraries -- cgit v1.2.1