def version(): upstream_git = parse_git("../nextpnr-src") if upstream_git.exact: nextpnr_version = upstream_git.format_with("{tag}") else: nextpnr_version = upstream_git.format_with("{tag}.post{distance}") package_git = parse_git("..") if not package_git.dirty: package_version = package_git.format_with(".dev{distance}") else: package_version = package_git.format_with(".dev{distance}+dirty") return nextpnr_version + package_version
def doc_version(): try: from setuptools_scm.git import parse as parse_git except ImportError: return "" git = parse_git(".") if git.exact: return git.format_with("{tag}") else: return "latest"
def parse(root): try: return parse_pkginfo(root) except IOError: return parse_git(root)
def parse(root): try: return parse_pkginfo(root) except IOError: return parse_git(root)