Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/develop' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
ifilot committed Dec 10, 2023
2 parents c8a0c47 + 5e15316 commit 8943dd7
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,22 @@
import sys
import re

PKG = "pytessel"
VERSIONFILE = os.path.join(os.path.dirname(__file__), PKG, "_version.py")
verstr = "unknown"
try:
verstrline = open(VERSIONFILE, "rt").read()
except EnvironmentError:
pass # Okay, there is no version file.
else:
VSRE = r"^__version__ = ['\"]([^'\"]*)['\"]"
mo = re.search(VSRE, verstrline, re.M)
if mo:
verstr = mo.group(1)
else:
print(r"Unable to find version in %s" % (VERSIONFILE,))
raise RuntimeError(r"If %s.py exists, it is required to be well-formed" % (VERSIONFILE,))

PKG = "pytessel"
VERSIONFILE = os.path.join(os.path.dirname(__file__), PKG, "_version.py")
verstr = "unknown"
Expand Down

0 comments on commit 8943dd7

Please sign in to comment.