Skip to content

Commit

Permalink
Redo setup/py version a bit
Browse files Browse the repository at this point in the history
  • Loading branch information
gb119 committed Apr 5, 2021
1 parent 6a32737 commit 5880aa6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions setup.py
Expand Up @@ -6,14 +6,15 @@


def get_version():
with open("Stoner/__init__.py","r") as init:
init_name=os.path.join(os.path.dirname(__file__),"Stoner","__init__.py")
with open(init_name,"r") as init:
for line in init:
line=line.strip()
if line.startswith("__version_info__"):
parts=line.split("=")
__version_info__=eval(parts[1].strip())
return '.'.join(__version_info__)
return None
raise ValueError(f"Failed to get version info from {init_name}")

def yield_sphinx_only_markup(lines):
"""
Expand Down

0 comments on commit 5880aa6

Please sign in to comment.