Skip to content

Commit

Permalink
nevermind on dirty version labeling
Browse files Browse the repository at this point in the history
  • Loading branch information
dschep committed Feb 10, 2016
1 parent 1e3950c commit 3b051b0
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,15 @@

try:
version_output = check_output(['git', 'describe',
'--match=v*.*.*', '--dirty'])
'--match=v*.*.*'])
except (OSError, CalledProcessError):
version = None
else:
version_parts = version_output.decode().strip().lstrip('v').split('-')
if len(version_parts) == 1:
version = version_parts[0]
elif len(version_parts) > 1:
version = '-'.join(version_parts[:2])
if version_parts[-1] == 'dirty':
version += '.dev'
version = '-'.join(version_parts[:-1])


setup(
Expand Down

0 comments on commit 3b051b0

Please sign in to comment.