(headername)
| 85 | |
| 86 | # Get the Blosc2 version provided the 'blosc2.h' header |
| 87 | def get_blosc2_version(headername): |
| 88 | major, minor, release = None, None, None |
| 89 | for line in headername.read_text().splitlines(): |
| 90 | if "BLOSC2_VERSION_MAJOR" in line and "major" in line: |
| 91 | major = int(line.split()[2]) |
| 92 | elif "BLOSC2_VERSION_MINOR" in line and "minor" in line: |
| 93 | minor = int(line.split()[2]) |
| 94 | elif "BLOSC2_VERSION_RELEASE" in line and "tweaks" in line: |
| 95 | release = line.split()[2] |
| 96 | if None not in (major, minor, release): |
| 97 | break |
| 98 | else: |
| 99 | exit_with_error("Unable to detect Blosc2 library version!") |
| 100 | return Version(f"{major}.{minor}.{release}") |
| 101 | |
| 102 | |
| 103 | def get_blosc2_directories(): |
no test coverage detected