Fix version detection
This commit is contained in:
13
docs/conf.py
13
docs/conf.py
@@ -48,19 +48,10 @@ copyright = u'2013, Author'
|
|||||||
# built documents.
|
# built documents.
|
||||||
#
|
#
|
||||||
# The short X.Y version.
|
# The short X.Y version.
|
||||||
def extract_version():
|
import capnp
|
||||||
"""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
|
|
||||||
|
|
||||||
vs = extract_version()
|
vs = capnp.__version__
|
||||||
# The short X.Y version.
|
# The short X.Y version.
|
||||||
import string
|
|
||||||
version = vs.rstrip(string.letters)
|
version = vs.rstrip(string.letters)
|
||||||
# The full version, including alpha/beta/rc tags.
|
# The full version, including alpha/beta/rc tags.
|
||||||
release = vs
|
release = vs
|
||||||
|
|||||||
Reference in New Issue
Block a user