summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorMarius Gedminas <marius@gedmin.as>2017-12-14 10:52:52 +0200
committerMarius Gedminas <marius@gedmin.as>2017-12-14 10:52:52 +0200
commitd64c25dd87dac0ac8329d00405d102b9a8f78827 (patch)
tree60c9c5e3bc6329fe8bcd84a615106566080c0fbe /docs
parentf43bde8adbf34f2a75012c6ea44ecbd5aa7e9dc5 (diff)
downloadzope-interface-d64c25dd87dac0ac8329d00405d102b9a8f78827.tar.gz
Fix hardcoded version number in Sphinx docs
Diffstat (limited to 'docs')
-rw-r--r--docs/conf.py13
1 files changed, 9 insertions, 4 deletions
diff --git a/docs/conf.py b/docs/conf.py
index b3fa2a8..e2d7a5f 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -8,10 +8,15 @@
# Note that not all possible configuration values are present in this
# autogenerated file.
#
+import sys, os
# All configuration values have a default; values that are commented out
# serve to show the default.
-import sys, os
+import sys
+import os
+import pkg_resources
+sys.path.append(os.path.abspath('../src'))
+rqmt = pkg_resources.require('zope.interface')[0]
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
@@ -49,16 +54,16 @@ master_doc = 'index'
# General information about the project.
project = 'zope.interface'
-copyright = '2012, Zope Foundation contributors'
+copyright = '2012-2017, Zope Foundation contributors'
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The short X.Y version.
-version = '4.3'
+version = '%s.%s' % tuple(map(int, rqmt.version.split('.')[:2]))
# The full version, including alpha/beta/rc tags.
-release = '4.3.4'
+release = rqmt.version
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.