Changed version punctuation for PEP 440 compliance

They now look like:  0.11.0+295.gec6e264.dirty
instead of:          0.11.0-295-gec6e264-dirty
This commit is contained in:
Kodi Arfer 2016-10-13 13:41:14 -07:00
parent ec6e264753
commit ac01c0f03f

View File

@ -31,8 +31,10 @@ os.chdir(os.path.split(os.path.abspath(__file__))[0])
PKG = "hy"
VERSIONFILE = os.path.join(PKG, "version.py")
try:
__version__ = subprocess.check_output([
"git", "describe", "--tags", "--dirty"]).decode('ASCII').strip()
__version__ = (subprocess.check_output
(["git", "describe", "--tags", "--dirty"])
.decode('ASCII').strip()
.replace('-', '+', 1).replace('-', '.'))
with open(VERSIONFILE, "wt") as o:
o.write("__version__ = {!r}\n".format(__version__))
except subprocess.CalledProcessError: