diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2022-01-28 23:02:54 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-28 23:02:54 (GMT) |
commit | 1f036ede59e2c4befc07714cf76603c591d5c972 (patch) | |
tree | 0367a1d52d4fd82a794b55a21d41272446f535d5 /Lib | |
parent | 24cc6411adbfe5555ecd8901f1ea50caa414c908 (diff) | |
download | cpython-1f036ede59e2c4befc07714cf76603c591d5c972.zip cpython-1f036ede59e2c4befc07714cf76603c591d5c972.tar.gz cpython-1f036ede59e2c4befc07714cf76603c591d5c972.tar.bz2 |
bpo-43112: detect musl as a separate SOABI (GH-24502)
musl libc and gnu libc are not ABI compatible so we need set different
SOABI for musl and not simply assume that all linux is linux-gnu.
Replace linux-gnu with the detected os for the build from config.guess
for linux-musl*.
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/test/test_sysconfig.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/test/test_sysconfig.py b/Lib/test/test_sysconfig.py index 80fe9c8..7ba004d 100644 --- a/Lib/test/test_sysconfig.py +++ b/Lib/test/test_sysconfig.py @@ -433,11 +433,11 @@ class TestSysConfig(unittest.TestCase): self.assertTrue('linux' in suffix, suffix) if re.match('(i[3-6]86|x86_64)$', machine): if ctypes.sizeof(ctypes.c_char_p()) == 4: - self.assertTrue(suffix.endswith('i386-linux-gnu.so') or - suffix.endswith('x86_64-linux-gnux32.so'), - suffix) + expected_suffixes = 'i386-linux-gnu.so', 'x86_64-linux-gnux32.so', 'i386-linux-musl.so' else: # 8 byte pointer size - self.assertTrue(suffix.endswith('x86_64-linux-gnu.so'), suffix) + expected_suffixes = 'x86_64-linux-gnu.so', 'x86_64-linux-musl.so' + self.assertTrue(suffix.endswith(expected_suffixes), + f'unexpected suffix {suffix!r}') @unittest.skipUnless(sys.platform == 'darwin', 'OS X-specific test') def test_osx_ext_suffix(self): |