diff --git a/setup.py b/setup.py index 2d02dce..5f2d007 100644 --- a/setup.py +++ b/setup.py @@ -60,6 +60,10 @@ def read_version_tag(): return None +def read_version_from_json_file(): + with open(os.path.join(os.path.dirname(__file__), "pepper", "version.json")) as f: + return json.load(f)['version'] + def parse_version_tag(tag): ''' Parse the output from Git describe @@ -68,7 +72,7 @@ def parse_version_tag(tag): Git SHA (if available). ''' if not tag or '-g' not in tag: - return tag, None, None + return read_version_from_json_file(), None, None match = re.search('(?P.*)-(?P[0-9]+)-g(?P[0-9a-fA-F]+)', tag)