summaryrefslogtreecommitdiffstats
path: root/base/common
diff options
context:
space:
mode:
authorChristian Heimes <cheimes@redhat.com>2016-03-02 18:03:45 +0100
committerChristian Heimes <cheimes@redhat.com>2016-03-03 21:44:23 +0100
commit87d515ba6062e51bded729cc81e8108d2c42deff (patch)
tree7f7d200d738c9ce5ccda206bd15fdc67938b5051 /base/common
parent9c6b53ac8f6eee2eb8ed8f47a4b26be828626841 (diff)
downloadpki-87d515ba6062e51bded729cc81e8108d2c42deff.tar.gz
pki-87d515ba6062e51bded729cc81e8108d2c42deff.tar.xz
pki-87d515ba6062e51bded729cc81e8108d2c42deff.zip
Backwards compatibility with sphinx 1.1
sphinx 1.1 doesn't have sphinx.version_info. All supported version have sphinx.__version__ string. conf.py now parses the string for version tests.
Diffstat (limited to 'base/common')
-rw-r--r--base/common/python/conf.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/base/common/python/conf.py b/base/common/python/conf.py
index f996c6371..4792254e3 100644
--- a/base/common/python/conf.py
+++ b/base/common/python/conf.py
@@ -21,6 +21,8 @@ import sphinx
# documentation root, use os.path.abspath to make it absolute, like shown here.
sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))
+# Sphinx 1.1 has only sphinx.__version__ string
+SPHINX_VERSION = tuple(int(v) for v in sphinx.__version__.split('.')[:2])
# -- General configuration -----------------------------------------------
@@ -95,7 +97,7 @@ pygments_style = 'sphinx'
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
-if sphinx.version_info < (1, 3):
+if SPHINX_VERSION < (1, 3):
html_theme = 'default'
else:
html_theme = 'classic'