We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 5e77f24 + 0a419f8 commit de2baa5Copy full SHA for de2baa5
1 file changed
setup.py
@@ -60,6 +60,10 @@ def read_version_tag():
60
61
return None
62
63
+def read_version_from_json_file():
64
+ with open(os.path.join(os.path.dirname(__file__), "pepper", "version.json")) as f:
65
+ return json.load(f)['version']
66
+
67
def parse_version_tag(tag):
68
'''
69
Parse the output from Git describe
@@ -68,7 +72,7 @@ def parse_version_tag(tag):
72
Git SHA (if available).
73
70
74
if not tag or '-g' not in tag:
71
- return tag, None, None
75
+ return read_version_from_json_file(), None, None
76
77
match = re.search('(?P<version>.*)-(?P<num_commits>[0-9]+)-g(?P<sha>[0-9a-fA-F]+)', tag)
78
0 commit comments