summaryrefslogtreecommitdiff
path: root/doc/source/conf.py
diff options
context:
space:
mode:
authorPauli Virtanen <pav@iki.fi>2009-04-13 19:39:20 +0000
committerPauli Virtanen <pav@iki.fi>2009-04-13 19:39:20 +0000
commitcdf0be318539e771b7ce535175ba7fd0032495be (patch)
tree517f9140556eff9d22b050348799a9e99aae6606 /doc/source/conf.py
parent48d27be1a9353ed49a8afc6ac855eb08dd993abe (diff)
downloadnumpy-cdf0be318539e771b7ce535175ba7fd0032495be.tar.gz
Deprecating sphinxext/autosummary in favor of the version in Sphinx >= 0.7
Diffstat (limited to 'doc/source/conf.py')
-rw-r--r--doc/source/conf.py25
1 files changed, 17 insertions, 8 deletions
diff --git a/doc/source/conf.py b/doc/source/conf.py
index 6261bd8bb..d5ab2cd78 100644
--- a/doc/source/conf.py
+++ b/doc/source/conf.py
@@ -2,26 +2,28 @@
import sys, os, re
-# If your extensions are in another directory, add it here. If the directory
-# is relative to the documentation root, use os.path.abspath to make it
-# absolute, like shown here.
-sys.path.append(os.path.abspath('../sphinxext'))
-
# Check Sphinx version
import sphinx
if sphinx.__version__ < "0.5":
raise RuntimeError("Sphinx 0.5.dev or newer required")
-
# -----------------------------------------------------------------------------
# General configuration
# -----------------------------------------------------------------------------
# Add any Sphinx extension module names here, as strings. They can be extensions
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
+
+sys.path.append(os.path.abspath('../sphinxext'))
+
extensions = ['sphinx.ext.autodoc', 'sphinx.ext.pngmath', 'numpydoc',
- 'phantom_import', 'autosummary', 'sphinx.ext.intersphinx',
- 'sphinx.ext.coverage', 'only_directives']
+ 'sphinx.ext.intersphinx', 'sphinx.ext.coverage',
+ 'only_directives']
+
+if sphinx.__version__ >= "0.7":
+ extensions.append('sphinx.ext.autosummary')
+else:
+ extensions.append('autosummary')
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
@@ -211,6 +213,13 @@ intersphinx_mapping = {'http://docs.python.org/dev': None}
phantom_import_file = 'dump.xml'
# -----------------------------------------------------------------------------
+# Autosummary
+# -----------------------------------------------------------------------------
+
+import glob
+autosummary_generate = glob.glob("reference/*.rst")
+
+# -----------------------------------------------------------------------------
# Coverage checker
# -----------------------------------------------------------------------------
coverage_ignore_modules = r"""