MCPcopy Create free account
hub / github.com/F-Stack/f-stack / elftools_version

Function elftools_version

dpdk/usertools/dpdk-pmdinfo.py:224–233  ·  view source on GitHub ↗

Extract pyelftools version as a tuple of integers for easy comparison.

()

Source from the content-addressed store, hash-verified

222
223# ----------------------------------------------------------------------------
224def elftools_version():
225 """
226 Extract pyelftools version as a tuple of integers for easy comparison.
227 """
228 version = getattr(elftools, "__version__", "")
229 match = re.match(r"^(\d+)\.(\d+).*$", str(version))
230 if not match:
231 # cannot determine version, hope for the best
232 return (0, 24)
233 return (int(match[1]), int(match[2]))
234
235
236ELFTOOLS_VERSION = elftools_version()

Callers 1

dpdk-pmdinfo.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected