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

Function get_blosc2_version

setup.py:87–100  ·  view source on GitHub ↗
(headername)

Source from the content-addressed store, hash-verified

85
86# Get the Blosc2 version provided the 'blosc2.h' header
87def 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
103def get_blosc2_directories():

Callers 1

setup.pyFile · 0.85

Calls 1

exit_with_errorFunction · 0.85

Tested by

no test coverage detected