summaryrefslogtreecommitdiffstats
path: root/setup.py
diff options
context:
space:
mode:
authorBenjamin Dauvergne <bdauvergne@entrouvert.com>2013-05-15 13:34:40 (GMT)
committerBenjamin Dauvergne <bdauvergne@entrouvert.com>2013-05-15 13:34:40 (GMT)
commitf49cadf409a6bee9c06ad7457ac23064c8da7ad2 (patch)
tree5796c4c3f4d27c00575136a7abb3274dd16b31e5 /setup.py
parentd2e123975ba0a61c6fb51457cd09bd3e2c4d36b2 (diff)
downloadeopayment-f49cadf409a6bee9c06ad7457ac23064c8da7ad2.zip
eopayment-f49cadf409a6bee9c06ad7457ac23064c8da7ad2.tar.gz
eopayment-f49cadf409a6bee9c06ad7457ac23064c8da7ad2.tar.bz2
setup.py: update get_version
Diffstat (limited to 'setup.py')
-rwxr-xr-xsetup.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/setup.py b/setup.py
index d63fea2..77f8f43 100755
--- a/setup.py
+++ b/setup.py
@@ -9,7 +9,6 @@ import distutils.core
from glob import glob
from os.path import splitext, basename, join as pjoin
import os
-import re
from unittest import TextTestRunner, TestLoader
class TestCommand(distutils.core.Command):
@@ -57,11 +56,11 @@ def get_version():
assert version is not None
if os.path.exists('.git'):
import subprocess
- p = subprocess.Popen(['git','describe','--dirty'],
+ p = subprocess.Popen(['git','describe','--dirty','--match=v*'],
stdout=subprocess.PIPE)
result = p.communicate()[0]
assert p.returncode == 0, 'git returned non-zero'
- new_version = result.split()[0]
+ new_version = result.split()[0][1:]
assert not new_version.endswith('-dirty'), 'git workdir is not clean'
assert new_version.split('-')[0] == version, '__version__ must match the last git annotated tag'
version = new_version.replace('-', '.')