When checking the version of python you can do something like
import sys
if sys.version < (3,5):
raise ImportError('Upgrade to python 3.5 or newer')
The equivalent for pygit2 seems to be something like
import pygit2
if (pygit2.LIBGIT2_VER_MAJOR, pygit2.LIBGIT2_VER_MINOR, pygit2.LIBGIT2_VER_REVISION) < (0, 26):
raise ImportError('Upgrade libgit2 to version 0.26 or nerwer (and pygit2 to match)')
or something like
import pygit2
if tuple(int(n) for n in pygit2.LIBGIT2_VERSION.split('.')) < (0,26):
raise ImportError('Upgrade libgit2 to version 0.26 or nerwer (and pygit2 to match)')
It would be nice to have a variable that is a tuple builtin to pygit2 going forward. Support for something like this maybe?
import pygit2
if pygit2.LIBGIT2_VERSION_TUPLE < (0,26):
raise ImportError('Upgrade libgit2 to version 0.26 or nerwer (and pygit2 to match)')
When checking the version of python you can do something like
The equivalent for
pygit2seems to be something likeor something like
It would be nice to have a variable that is a tuple builtin to pygit2 going forward. Support for something like this maybe?