diff --git a/setup.py b/setup.py index cd11ba86a5..a36e5be153 100755 --- a/setup.py +++ b/setup.py @@ -24,6 +24,7 @@ if os.getenv('OFFICIAL', 'no') == 'yes': else: build_tag = '-' + '0.git' + subprocess.Popen("git describe --long | cut -d - -f 2-2", shell=True, stdout=subprocess.PIPE).stdout.read().strip() + def get_version(): ver = subprocess.Popen("git describe --long | cut -f1-1 -d -", shell=True, stdout=subprocess.PIPE).stdout.read().strip() return re.sub(r'-([0-9]+)-.*', r'.\1', ver)