Skip to content

Commit 5428c12

Browse files
committed
BUG: adjust regexp to extract ABI from extension filename
Allow stable ABI extension filenames to include a multiarch tuple. Fixes #875.
1 parent af61118 commit 5428c12

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

mesonpy/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ class InvalidLicenseExpression(Exception): # type: ignore[no-redef]
9999
_MESON_ARGS_KEYS = ['dist', 'setup', 'compile', 'install']
100100

101101
_SUFFIXES = importlib.machinery.all_suffixes()
102-
_EXTENSION_SUFFIX_REGEX = re.compile(r'^[^.]+\.(?:(?P<abi>[^.]+)\.)?(?:so|pyd|dll)$')
102+
_EXTENSION_SUFFIX_REGEX = re.compile(r'^[^.]+\.(?:(?P<abi>[^.-]+)(?:-[^.]+)?\.)?(?:so|pyd|dll)$')
103103
assert all(re.match(_EXTENSION_SUFFIX_REGEX, f'foo{x}') for x in importlib.machinery.EXTENSION_SUFFIXES)
104104

105105
# Map Meson installation path placeholders to wheel installation paths.

0 commit comments

Comments
 (0)