Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@
def gitinfo():
from subprocess import Popen, PIPE, check_output
kw = dict(stdout=PIPE, cwd=MYDIR, universal_newlines=True)
proc = Popen(['git', 'describe', '--tags', '--match=v[[:digit:]]*'], **kw)
proc = Popen(['git', 'describe', '--tags', '--match=[v,V,[:digit:]]*'], **kw)
desc = proc.stdout.read()
proc = Popen(['git', 'log', '-1', '--format=%H %ct %ci'], **kw)
glog = proc.stdout.read()
rv = {}
rv['commit'], rv['timestamp'], rv['date'] = glog.strip().split(None, 2)
version = check_output(['git', 'tag']).decode('ascii').strip()
version = '.post'.join(desc.strip().split('-')[:2]).lstrip('vV')
rv['version'] = version
return rv

Expand All @@ -56,7 +56,7 @@ def getversioncfg():
cp0.read(gitarchivecfgfile)
if len(cp0.get('DEFAULT', 'commit')) > 20:
g = cp0.defaults()
mx = re.search(r'\btag: v(\d[^,]*)', g.pop('refnames'))
mx = re.search(r'\btag: [vV]?(\d[^,]*)', g.pop('refnames'))
if mx:
g['version'] = mx.group(1)
# then try to obtain version data from git.
Expand Down