Fix version detection

This commit is contained in:
Jason Paryani
2013-08-25 17:56:59 -07:00
parent 62d55e55f6
commit 57dc3aa9fe

View File

@@ -48,19 +48,10 @@ copyright = u'2013, Author'
# built documents.
#
# The short X.Y version.
def extract_version():
"""extract version from version.py, so it's not multiply defined"""
with open(os.path.join('..', 'capnp', 'version.py')) as f:
line = f.readline()
while not line.startswith("version"):
line = f.readline()
print line
exec(line)
return version
import capnp
vs = extract_version()
vs = capnp.__version__
# The short X.Y version.
import string
version = vs.rstrip(string.letters)
# The full version, including alpha/beta/rc tags.
release = vs