Skip to content

Commit 7364556

Browse files
authored
Update setup.py
1 parent 22b1c9f commit 7364556

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

setup.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
def gitinfo():
3434
from subprocess import Popen, PIPE, check_output
3535
kw = dict(stdout=PIPE, cwd=MYDIR, universal_newlines=True)
36-
proc = Popen(['git', 'describe', '--tags', '--match=v[[:digit:]]*'], **kw)
36+
proc = Popen(['git', 'describe', '--tags', '--match=[v,V,[:digit:]]*'], **kw)
3737
desc = proc.stdout.read()
3838
proc = Popen(['git', 'log', '-1', '--format=%H %ct %ci'], **kw)
3939
glog = proc.stdout.read()
@@ -56,7 +56,7 @@ def getversioncfg():
5656
cp0.read(gitarchivecfgfile)
5757
if len(cp0.get('DEFAULT', 'commit')) > 20:
5858
g = cp0.defaults()
59-
mx = re.search(r'\btag: v(\d[^,]*)', g.pop('refnames'))
59+
mx = re.search(r'\btag: [vV]?(\d[^,]*)', g.pop('refnames'))
6060
if mx:
6161
g['version'] = mx.group(1)
6262
# then try to obtain version data from git.

0 commit comments

Comments
 (0)