Permalink
Browse files

update setup.py

  • Loading branch information...
sdpython committed May 22, 2017
1 parent 65070b3 commit 13d1ec06c9a3f66ea0271062f0d2762b370d87ec
Showing with 5 additions and 4 deletions.
  1. +5 −4 setup.py
View
@@ -139,14 +139,15 @@ def write_version():
if sys.version_info[0] != 2:
write_version()
if os.path.exists("version.txt"):
with open("version.txt", "r") as f:
versiontxt = os.path.join(os.path.dirname(__file__), "version.txt")
if os.path.exists(versiontxt):
with open(versiontxt, "r") as f:
lines = f.readlines()
subversion = "." + lines[0].strip("\r\n ")
if subversion == ".0":
raise Exception("subversion is wrong: " + subversion)
raise Exception("Subversion is wrong: '{0}'.".format(subversion))
else:
raise FileNotFoundError("version.txt")
raise FileNotFoundError(versiontxt)
else:
# when the module is installed, no commit number is displayed
subversion = ""

0 comments on commit 13d1ec0

Please sign in to comment.