Python git.__version__() Examples

The following are 1 code examples of git.__version__(). You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may also want to check out all available functions/classes of the module git , or try the search function .
Example #1
Source File: _git.py    From sumatra with BSD 2-Clause "Simplified" License 5 votes vote down vote up
def check_version():
    if not hasattr(git, "Repo"):
        raise VersionControlError(
            "GitPython not installed. There is a 'git' package, but it is not "
            "GitPython (https://pypi.python.org/pypi/GitPython/)")
    minimum_version = '0.3.5'
    if LooseVersion(git.__version__) < LooseVersion(minimum_version):
        raise VersionControlError(
            "Your Git Python binding is too old. You require at least "
            "version {0}. You can install the latest version e.g. via "
            "'pip install -U gitpython'".format(minimum_version))