Skip to content

Commit

Permalink
Fix version parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
gaogaotiantian committed Aug 20, 2020
1 parent 7850b80 commit e9ce2b1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@
with open("./src/viztracer/__init__.py") as f:
for line in f.readlines():
if line.startswith("__version__"):
version = line.split("=")[-1].strip()
# __version__ = "0.9"
delim = '"' if '"' in line else "'"
version = line.split(delim)[1]
break
else:
print("Can't find version! Stop Here!")
Expand Down

0 comments on commit e9ce2b1

Please sign in to comment.