Skip to content

Commit e4019d7

Browse files
committed
Fix changed theme name in Sphinx 1.3
Set the theme name to default or classic depending on the version of Sphinx used
1 parent 6387fca commit e4019d7

File tree

1 file changed

+6
-1
lines changed
  • lib/matplotlib/sphinxext/tests/tinypages

1 file changed

+6
-1
lines changed

lib/matplotlib/sphinxext/tests/tinypages/conf.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414

1515
import sys
1616
from os.path import join as pjoin, abspath
17+
import sphinx
18+
from distutils.version import LooseVersion
1719

1820
# If extensions (or modules to document with autodoc) are in another directory,
1921
# add these directories to sys.path here. If the directory is relative to the
@@ -99,7 +101,10 @@
99101

100102
# The theme to use for HTML and HTML Help pages. See the documentation for
101103
# a list of builtin themes.
102-
html_theme = 'default'
104+
if LooseVersion(sphinx.__version__) >= LooseVersion('1.3'):
105+
html_theme = 'classic'
106+
else:
107+
html_theme = 'default'
103108

104109
# Theme options are theme-specific and customize the look and feel of a theme
105110
# further. For a list of options available for each theme, see the

0 commit comments

Comments
 (0)