summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPauli Virtanen <pav@iki.fi>2013-02-16 15:46:10 +0200
committerPauli Virtanen <pav@iki.fi>2013-02-16 17:32:34 +0200
commitcc832530ef784723953dcb3ae943d95da6afb557 (patch)
tree93a6209c6be91cfca6b6ed94d296343e53360f21
parent7f2da39dea8f869ea4d5256786f55eacbd5722e6 (diff)
downloadnumpy-cc832530ef784723953dcb3ae943d95da6afb557.tar.gz
MAINT: always use plot directive from Matplotlib, and prefer Sphinx linkcode
-rw-r--r--doc/source/conf.py25
1 files changed, 3 insertions, 22 deletions
diff --git a/doc/source/conf.py b/doc/source/conf.py
index de9f6adf3..0fb517961 100644
--- a/doc/source/conf.py
+++ b/doc/source/conf.py
@@ -20,24 +20,8 @@ sys.path.insert(0, os.path.abspath('../sphinxext'))
extensions = ['sphinx.ext.autodoc', 'sphinx.ext.pngmath', 'numpydoc',
'sphinx.ext.intersphinx', 'sphinx.ext.coverage',
- 'sphinx.ext.doctest', 'sphinx.ext.autosummary']
-
-# Determine if the matplotlib has a recent enough version of the
-# plot_directive, otherwise use the local fork.
-try:
- from matplotlib.sphinxext import plot_directive
-except ImportError:
- use_matplotlib_plot_directive = False
-else:
- try:
- use_matplotlib_plot_directive = (plot_directive.__version__ >= 2)
- except AttributeError:
- use_matplotlib_plot_directive = False
-
-if use_matplotlib_plot_directive:
- extensions.append('matplotlib.sphinxext.plot_directive')
-else:
- extensions.append('plot_directive')
+ 'sphinx.ext.doctest', 'sphinx.ext.autosummary',
+ 'matplotlib.sphinxext.plot_directive']
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
@@ -283,9 +267,6 @@ plot_rcparams = {
'text.usetex': False,
}
-if not use_matplotlib_plot_directive:
- import matplotlib
- matplotlib.rcParams.update(plot_rcparams)
# -----------------------------------------------------------------------------
# Source code links
@@ -294,7 +275,7 @@ if not use_matplotlib_plot_directive:
import inspect
from os.path import relpath, dirname
-for name in ['sphinx.ext.linkcode', 'linkcode', 'numpydoc.linkcode']:
+for name in ['sphinx.ext.linkcode', 'numpydoc.linkcode']:
try:
__import__(name)
extensions.append(name)