setup.py: use tag which begins by v

This commit is contained in:
Jérôme Schneider 2014-03-03 18:30:37 +01:00
parent b60530da58
commit 119cc70748
1 changed files with 4 additions and 2 deletions

View File

@ -31,9 +31,11 @@ def get_version():
version_file.close()
return version
if os.path.exists('.git'):
p = subprocess.Popen(['git','describe','--long'], stdout=subprocess.PIPE)
p = subprocess.Popen(['git','describe','--match=v*'],
stdout=subprocess.PIPE)
result = p.communicate()[0]
return result.split()[0].replace('-','.')
version = result.split()[0][1:]
return version.replace('-','.')
import mandaye
return mandaye.VERSION