Skip to content

Commit

Permalink
Move JSON file check so it works for build-time and for install-time
Browse files Browse the repository at this point in the history
  • Loading branch information
whiteinge committed Nov 6, 2015
1 parent de2baa5 commit 6e2c91c
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 @@ -58,6 +58,9 @@ def read_version_tag():
else:
return out.strip() or None

else:
return read_version_from_json_file()

return None

def read_version_from_json_file():
Expand All @@ -72,7 +75,7 @@ def parse_version_tag(tag):
Git SHA (if available).
'''
if not tag or '-g' not in tag:
return read_version_from_json_file(), None, None
return tag, None, None

match = re.search('(?P<version>.*)-(?P<num_commits>[0-9]+)-g(?P<sha>[0-9a-fA-F]+)', tag)

Expand Down

0 comments on commit 6e2c91c

Please sign in to comment.