From: whitequark Date: Wed, 16 Oct 2019 15:29:13 +0000 (+0000) Subject: setup: update scm_version(). X-Git-Tag: 24jan2021_ls180~45 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=57a425046885cf1e64690c273cff707e4bfb82ea;p=nmigen-soc.git setup: update scm_version(). --- diff --git a/setup.py b/setup.py index 5a8baa2..016458b 100644 --- a/setup.py +++ b/setup.py @@ -3,8 +3,15 @@ from setuptools import setup, find_packages def scm_version(): def local_scheme(version): - return version.format_choice("+{node}", "+{node}.dirty") - return {"version_scheme": "guess-next-dev", "local_scheme": local_scheme} + if version.tag and not version.distance: + return version.format_with("") + else: + return version.format_choice("+{node}", "+{node}.dirty") + return { + "relative_to": __file__, + "version_scheme": "guess-next-dev", + "local_scheme": local_scheme + } setup(