From 410393ac4513597cb9dc5a90adc2a1bf6159b43c Mon Sep 17 00:00:00 2001 From: rnv Date: Thu, 9 Aug 2018 19:36:52 +0300 Subject: [PATCH] Detect sphinx theme directly in conf.py.in file --- doc/en/conf.py.in | 3 ++- doc/fr/conf.py.in | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/doc/en/conf.py.in b/doc/en/conf.py.in index e7c901e5..650691b0 100644 --- a/doc/en/conf.py.in +++ b/doc/en/conf.py.in @@ -12,6 +12,7 @@ # serve to show the default. import sys, os +import sphinx # 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 @@ -91,7 +92,7 @@ pygments_style = 'sphinx' # The theme to use for HTML and HTML Help pages. Major themes that come with # Sphinx are currently 'default' and 'sphinxdoc'. -html_theme = '@SPHINX_THEME@' +html_theme = 'default' if sphinx.version_info[:2] < (1,3) else 'classic' # Theme options are theme-specific and customize the look and feel of a theme # further. For a list of options available for each theme, see the diff --git a/doc/fr/conf.py.in b/doc/fr/conf.py.in index 0929a20b..62fb135b 100644 --- a/doc/fr/conf.py.in +++ b/doc/fr/conf.py.in @@ -12,6 +12,7 @@ # serve to show the default. import sys, os +import sphinx # 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 @@ -91,7 +92,7 @@ pygments_style = 'sphinx' # The theme to use for HTML and HTML Help pages. Major themes that come with # Sphinx are currently 'default' and 'sphinxdoc'. -html_theme = '@SPHINX_THEME@' +html_theme = 'default' if sphinx.version_info[:2] < (1,3) else 'classic' # Theme options are theme-specific and customize the look and feel of a theme # further. For a list of options available for each theme, see the -- 2.39.2