From 57dc3aa9fef0a6f5379db76b435b1e65b22855b5 Mon Sep 17 00:00:00 2001 From: Jason Paryani Date: Sun, 25 Aug 2013 17:56:59 -0700 Subject: [PATCH] Fix version detection --- docs/conf.py | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 764c8fd..15aa9d8 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -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