Skip to content

Commit

Permalink
Use version.cfg when git is not installed
Browse files Browse the repository at this point in the history
  • Loading branch information
pavoljuhas committed Mar 11, 2014
1 parent a07adf1 commit 2a4d253
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,11 @@ def getversioncfg():
cp.read(versioncfgfile)
gitdir = os.path.join(MYDIR, '.git')
if not os.path.isdir(gitdir): return cp
try:
g = gitinfo()
except OSError:
return cp
d = cp.defaults()
g = gitinfo()
if g['version'] != d.get('version') or g['commit'] != d.get('commit'):
cp.set('DEFAULT', 'version', g['version'])
cp.set('DEFAULT', 'commit', g['commit'])
Expand Down

0 comments on commit 2a4d253

Please sign in to comment.