def METHOD_NAME(self):
    """
    Return package version based on a git tag.
    Pre-releases will be prefixed with '~' to comply with RPM pre-release versioning.
    """
    git_tag, git_commits, git_hash = self.describe()
    version = PACKAGE_PRERELEASE_RE.sub(r"~\g<prerelease>\g<num>", git_tag)
    if git_commits:
        version += f".{git_commits}.g{git_hash}"
    return version