def gpg_version():
    """Returns the GPG version"""
    cmd = flatten([gnupg_bin(), "--version"])
    output = stderr_output(cmd)
    output = output \
        .split('\n')[0] \
        .split(" ")[2] \
        .split('.')
    return tuple([int(x) for x in output])