From b335459e8b43afcc7b3db093105b90302618ac16 Mon Sep 17 00:00:00 2001 From: y-p Date: Thu, 11 Jul 2013 23:15:38 +0300 Subject: [PATCH 1/3] BLD: Use git describe to generate the version string for dev versions --- setup.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/setup.py b/setup.py index ec7f1628aada2..57d648e15b284 100755 --- a/setup.py +++ b/setup.py @@ -199,19 +199,20 @@ def build_extensions(self): try: import subprocess try: - pipe = subprocess.Popen(["git", "rev-parse", "--short", "HEAD"], + pipe = subprocess.Popen(["git", "describe", "HEAD"], stdout=subprocess.PIPE).stdout except OSError: # msysgit compatibility pipe = subprocess.Popen( - ["git.cmd", "rev-parse", "--short", "HEAD"], + ["git.cmd", "describe", "HEAD"], stdout=subprocess.PIPE).stdout rev = pipe.read().strip() # makes distutils blow up on Python 2.7 if sys.version_info[0] >= 3: rev = rev.decode('ascii') - FULLVERSION += "-%s" % rev + FULLVERSION = rev + except: warnings.warn("WARNING: Couldn't get git revision") else: From 142432aa2ffc9af0397e0ebccb8652c71c19e7e1 Mon Sep 17 00:00:00 2001 From: y-p Date: Fri, 12 Jul 2013 16:35:23 +0300 Subject: [PATCH 2/3] BLD: Strip leading v in git describe version string --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 57d648e15b284..4c7441b00d8f3 100755 --- a/setup.py +++ b/setup.py @@ -211,7 +211,7 @@ def build_extensions(self): if sys.version_info[0] >= 3: rev = rev.decode('ascii') - FULLVERSION = rev + FULLVERSION = rev.lstrip('v') except: warnings.warn("WARNING: Couldn't get git revision") From c95cddc9f0d45af774014f2dad3092cccc9f4e1a Mon Sep 17 00:00:00 2001 From: y-p Date: Thu, 25 Jul 2013 04:16:58 +0300 Subject: [PATCH 3/3] BLD: remove ISRELEASED flag --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 4c7441b00d8f3..d66ac345aa61a 100755 --- a/setup.py +++ b/setup.py @@ -189,7 +189,7 @@ def build_extensions(self): MAJOR = 0 MINOR = 12 MICRO = 0 -ISRELEASED = True +ISRELEASED = False VERSION = '%d.%d.%d' % (MAJOR, MINOR, MICRO) QUALIFIER = ''