Skip to content

Commit 075dbe9

Browse files
committed
Use version.cfg when git is not installed
1 parent aba9fe8 commit 075dbe9

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Diff for: setup.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,11 @@ def getversioncfg():
8484
cp.read(versioncfgfile)
8585
gitdir = os.path.join(MYDIR, '.git')
8686
if not os.path.isdir(gitdir): return cp
87+
try:
88+
g = gitinfo()
89+
except OSError:
90+
return cp
8791
d = cp.defaults()
88-
g = gitinfo()
8992
if g['version'] != d.get('version') or g['commit'] != d.get('commit'):
9093
cp.set('DEFAULT', 'version', g['version'])
9194
cp.set('DEFAULT', 'commit', g['commit'])

0 commit comments

Comments
 (0)