Commit ba6f36ab authored by Stefan Behnel's avatar Stefan Behnel

Generalise .so file regex even further as the platform suffix of extension...

Generalise .so file regex even further as the platform suffix of extension modules can be arbitrarily complex in Py3.5+.
parent 9ef49879
......@@ -41,6 +41,8 @@ Bugs fixed
* Cython annotation types in Python files could lead to import failures
with a "cython undefined" error. Recognised types are now turned into strings.
* Coverage analysis could fail to report on extension modules on some platforms.
* Annotations could be parsed (and rejected) as types even with
``annotation_typing=False``.
......
......@@ -113,7 +113,7 @@ class Plugin(CoveragePlugin):
basename = basename[:platform_suffix.start()]
elif ext == '.so':
# Linux/Unix/Mac extension module
platform_suffix = re.search(r'[.]cpython-[0-9]+[a-z]*(?:-[a-z0-9]+)?$', basename, re.I)
platform_suffix = re.search(r'[.]cpython-[0-9]+[-_a-z0-9]*$', basename, re.I)
if platform_suffix:
basename = basename[:platform_suffix.start()]
elif ext == '.pxi':
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment