Skip to content

Commit

Permalink
Incorporate changes from skotokithakis
Browse files Browse the repository at this point in the history
Co-authored-by: Stavros Korokithakis <[email protected]>
  • Loading branch information
moltenform and skorokithakis authored Jun 10, 2024
1 parent 3fe6d26 commit 6ed269c
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@
with open(version_file) as f:
for line in f.read().split("\n"):
if line.startswith("__version__ ="):
version = line.split("=", 1)[1]
version = version.replace("'", "").replace('"', '')
version = version.strip()
version = re.match(r"^\s*__version__\s*=\s*['\"](.*?)['\"]\s*$", line).group(1)
break
else:
print("No __version__ attribute found in %r" % version_file)
Expand Down

0 comments on commit 6ed269c

Please sign in to comment.