From ac01c0f03f915303ebbb8dd85a10dc3fb5296a64 Mon Sep 17 00:00:00 2001 From: Kodi Arfer Date: Thu, 13 Oct 2016 13:41:14 -0700 Subject: [PATCH] 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 --- setup.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 4d0a08e..c84706c 100755 --- a/setup.py +++ b/setup.py @@ -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: