diff options
author | Lars Wirzenius <liw@liw.fi> | 2017-01-01 14:13:13 +0200 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2017-01-01 14:13:13 +0200 |
commit | 28c5f998ee325c2ac3f02724f24728da35401e10 (patch) | |
tree | ec5fa4e2c7470cb9628e16f082ea085630f9859c | |
parent | f0a32a1a20f7f2bd8cac49e12f657dd910a7034b (diff) | |
download | code.liw.fi-keyring-28c5f998ee325c2ac3f02724f24728da35401e10.tar.gz |
Fix setup.py more
-rw-r--r-- | setup.py | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -4,8 +4,12 @@ import re import cliapp output = cliapp.runcmd(['dpkg-parsechangelog']) -m = re.search('^Version: (?P<version>.*)-[^-]*$', output, re.M) +m = re.search('^Version: (?P<version>.*)$', output, re.M) if not m: raise Exception('no version') -print m.group('version') - +v = m.group('version') +if '-' in v: + v = v.split('-')[0] +if '+' in v: + v = v.split('+')[0] +print v |