From 87d515ba6062e51bded729cc81e8108d2c42deff Mon Sep 17 00:00:00 2001 From: Christian Heimes Date: Wed, 2 Mar 2016 18:03:45 +0100 Subject: 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. --- base/common/python/conf.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'base/common/python') 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' -- cgit