Skip to content

Commit 32ecd79

Browse files
author
Greg Turnquist
committed
Fixed documentation to use springpython.properties.
1 parent 603633b commit 32ecd79

File tree

1 file changed

+18
-3
lines changed

1 file changed

+18
-3
lines changed

docs/sphinx/source/conf.py

+18-3
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,17 @@
1313

1414
import sys, os
1515

16+
# Read the properties file to harvest version info.
17+
p = {}
18+
with open("../../../springpython.properties") as f:
19+
lines = f.readlines()
20+
for line in lines:
21+
if "=" in line and not line.startswith("#"):
22+
(key, value) = line.split("=")
23+
p[key] = value[:-1]
24+
25+
print p
26+
1627
# If extensions (or modules to document with autodoc) are in another directory,
1728
# add these directories to sys.path here. If the directory is relative to the
1829
# documentation root, use os.path.abspath to make it absolute, like shown here.
@@ -41,16 +52,20 @@
4152

4253
# General information about the project.
4354
project = u'Spring Python'
44-
copyright = u'2010, Greg Turnquist, Dariusz Suchojad'
55+
copyright = u'2006-2011, Greg Turnquist, Dariusz Suchojad'
4556

4657
# The version info for the project you're documenting, acts as replacement for
4758
# |version| and |release|, also used in various other places throughout the
4859
# built documents.
4960
#
5061
# The short X.Y version.
51-
version = '1.2'
62+
version = ".".join(p["version"].split(".")[0:2])
63+
5264
# The full version, including alpha/beta/rc tags.
53-
release = '1.2.0.RC1'
65+
if "build.stamp" in p:
66+
release = p["version"] + "." + p["build.stamp"]
67+
else:
68+
release = p["version"] + "." + p["release.type"].upper()
5469

5570
# The language for content autogenerated by Sphinx. Refer to documentation
5671
# for a list of supported languages.

0 commit comments

Comments
 (0)