MCPcopy Create free account
hub / github.com/PyTables/PyTables / get_blosc_version

Function get_blosc_version

setup.py:70–83  ·  view source on GitHub ↗
(headername)

Source from the content-addressed store, hash-verified

68
69# Get the Blosc version provided the 'blosc.h' header
70def 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

Callers 1

setup.pyFile · 0.85

Calls 1

exit_with_errorFunction · 0.85

Tested by

no test coverage detected