diff options
author | Stefan Behnel <stefan_ml@behnel.de> | 2017-09-30 21:19:14 +0200 |
---|---|---|
committer | Stefan Behnel <stefan_ml@behnel.de> | 2017-09-30 21:19:14 +0200 |
commit | 9ef498797245cc60d7c998315c327ab65ae2b580 (patch) | |
tree | 993347f3e82e76f0b6948d51412c266b2844e721 /Cython/Coverage.py | |
parent | d42996985367ac7076b54fc3c50f2e0999849e05 (diff) | |
download | cython-9ef498797245cc60d7c998315c327ab65ae2b580.tar.gz |
Try to include also Macs in coverage .so file search.
Diffstat (limited to 'Cython/Coverage.py')
-rw-r--r-- | Cython/Coverage.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/Cython/Coverage.py b/Cython/Coverage.py index 4b8c44efb..07c66db2e 100644 --- a/Cython/Coverage.py +++ b/Cython/Coverage.py @@ -106,8 +106,14 @@ class Plugin(CoveragePlugin): ext = ext.lower() if ext in ('.py', '.pyx', '.pxd', '.c', '.cpp'): pass - elif ext in ('.so', '.pyd'): - platform_suffix = re.search(r'[.]cp(?:ython-[0-9]+[a-z]*|[0-9]+-win[_a-z0-9]*)$', basename, re.I) + elif ext == '.pyd': + # Windows extension module + platform_suffix = re.search(r'[.]cp[0-9]+-win[_a-z0-9]*$', basename, re.I) + if platform_suffix: + 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) if platform_suffix: basename = basename[:platform_suffix.start()] elif ext == '.pxi': |