diff --git a/Lib/test/test_sysconfig.py b/Lib/test/test_sysconfig.py index cc704228a26..c0f27a67cc7 100644 --- a/Lib/test/test_sysconfig.py +++ b/Lib/test/test_sysconfig.py @@ -404,6 +404,10 @@ class TestSysConfig(unittest.TestCase): else: # 8 byte pointer size self.assertTrue(suffix.endswith('x86_64-linux-gnu.so'), suffix) + @unittest.skipUnless(sys.platform == 'darwin', 'OS X-specific test') + def test_osx_ext_suffix(self): + suffix = sysconfig.get_config_var('EXT_SUFFIX') + self.assertTrue(suffix.endswith('-darwin.so'), suffix) class MakefileTests(unittest.TestCase): diff --git a/Misc/NEWS b/Misc/NEWS index ca7de81ad9c..0074417e31c 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -12,7 +12,8 @@ Core and Builtins - Issue #22980: Under Linux, GNU/KFreeBSD and the Hurd, C extensions now include the architecture triplet in the extension name, to make it easy to test builds - for different ABIs in the same working tree. + for different ABIs in the same working tree. Under OS X, the extension name + now includes PEP 3149-style information. - Issue #22631: Added Linux-specific socket constant CAN_RAW_FD_FRAMES. Patch courtesy of Joe Jevnik. diff --git a/configure b/configure index 46f82870aab..2e59ac8da57 100755 --- a/configure +++ b/configure @@ -5167,6 +5167,8 @@ cat >> conftest.c <&6; } case $ac_sys_system in - Linux*|GNU*) + Linux*|GNU*|Darwin) EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};; *) EXT_SUFFIX=${SHLIB_SUFFIX};; diff --git a/configure.ac b/configure.ac index 26d7b361f46..73a0a2f2aee 100644 --- a/configure.ac +++ b/configure.ac @@ -826,6 +826,8 @@ cat >> conftest.c <