summaryrefslogtreecommitdiff
path: root/doc/source/conf.py
diff options
context:
space:
mode:
authormattip <matti.picus@gmail.com>2018-04-13 15:01:16 +0300
committermattip <matti.picus@gmail.com>2018-04-13 15:01:16 +0300
commitc989bd430b73181c5415df5f9ccdcfcc314445cb (patch)
tree3b35c686cfd94c30475d67344f27077f5eba26f0 /doc/source/conf.py
parent1486f3756f0399c4a6ae2c42cb748669f1ff4dbe (diff)
downloadnumpy-c989bd430b73181c5415df5f9ccdcfcc314445cb.tar.gz
render the example in numpydoc, add ifconfig for host python major version
Diffstat (limited to 'doc/source/conf.py')
-rw-r--r--doc/source/conf.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/doc/source/conf.py b/doc/source/conf.py
index 1cd57697d..9e1d1a142 100644
--- a/doc/source/conf.py
+++ b/doc/source/conf.py
@@ -22,7 +22,7 @@ sys.path.insert(0, os.path.abspath('../sphinxext'))
extensions = ['sphinx.ext.autodoc', 'numpydoc',
'sphinx.ext.intersphinx', 'sphinx.ext.coverage',
'sphinx.ext.doctest', 'sphinx.ext.autosummary',
- 'sphinx.ext.graphviz',
+ 'sphinx.ext.graphviz', 'sphinx.ext.ifconfig',
'matplotlib.sphinxext.plot_directive']
if sphinx.__version__ >= "1.4":
@@ -82,6 +82,9 @@ add_function_parentheses = False
# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'
+def setup(app):
+ # add a config value for `ifconfig` directives
+ app.add_config_value('python_version_major', str(sys.version_info.major), 'env')
# -----------------------------------------------------------------------------
# HTML output