Skip to content

Commit 6e2c91c

Browse files
committed
Move JSON file check so it works for build-time and for install-time
1 parent de2baa5 commit 6e2c91c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

setup.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,9 @@ def read_version_tag():
5858
else:
5959
return out.strip() or None
6060

61+
else:
62+
return read_version_from_json_file()
63+
6164
return None
6265

6366
def read_version_from_json_file():
@@ -72,7 +75,7 @@ def parse_version_tag(tag):
7275
Git SHA (if available).
7376
'''
7477
if not tag or '-g' not in tag:
75-
return read_version_from_json_file(), None, None
78+
return tag, None, None
7679

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

0 commit comments

Comments
 (0)