(headername)
| 68 | |
| 69 | # Get the Blosc version provided the 'blosc.h' header |
| 70 | def get_blosc_version(headername): |
| 71 | major, minor, release = None, None, None |
| 72 | for line in headername.read_text().splitlines(): |
| 73 | if "BLOSC_VERSION_MAJOR" in line: |
| 74 | major = int(line.split()[2]) |
| 75 | elif "BLOSC_VERSION_MINOR" in line: |
| 76 | minor = int(line.split()[2]) |
| 77 | elif "BLOSC_VERSION_RELEASE" in line: |
| 78 | release = line.split()[2] |
| 79 | if None not in (major, minor, release): |
| 80 | break |
| 81 | else: |
| 82 | exit_with_error("Unable to detect Blosc library version!") |
| 83 | return Version(f"{major}.{minor}.{release}") |
| 84 | |
| 85 | |
| 86 | # Get the Blosc2 version provided the 'blosc2.h' header |
no test coverage detected