'Returns a tuple representing the GnuPG version number.'

def version_tuple(self, update=False):

    global GPG_VERSIONS
    if (update or (not GPG_VERSIONS.get(self.gpgbinary))):
        vertext = self.version().strip().split()[(-1)]
        version = tuple((int(v) for v in vertext.split('.')))
        GPG_VERSIONS[self.gpgbinary] = version
    return GPG_VERSIONS[self.gpgbinary]
