setup.py: tag version must start with a v

This commit is contained in:
Jérôme Schneider 2015-03-12 16:15:33 +01:00
parent a0ae126443
commit 7c62666b38
1 changed files with 4 additions and 2 deletions

View File

@ -23,9 +23,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 cam
return cam.__version__