|
11 | 11 | # nipype documentation build configuration file, created by
|
12 | 12 | # sphinx-quickstart on Mon Jul 20 12:30:18 2009.
|
13 | 13 | #
|
14 |
| -# This file is execfile()d with the current directory set to its containing dir. |
| 14 | +# This file is exec()d with the current directory set to its containing dir. |
15 | 15 | #
|
16 | 16 | # Note that not all possible configuration values are present in this
|
17 | 17 | # autogenerated file.
|
18 | 18 | #
|
19 | 19 | # All configuration values have a default; values that are commented out
|
20 | 20 | # serve to show the default.
|
21 | 21 |
|
22 |
| -import sys, os |
| 22 | +import sys |
| 23 | +import os |
23 | 24 |
|
24 | 25 | import nibabel
|
25 | 26 |
|
| 27 | +# Check for external Sphinx extensions we depend on |
| 28 | +try: |
| 29 | + import numpydoc |
| 30 | +except ImportError: |
| 31 | + raise RuntimeError('Need to install "numpydoc" package for doc build') |
| 32 | + |
26 | 33 | # If extensions (or modules to document with autodoc) are in another directory,
|
27 | 34 | # add these directories to sys.path here. If the directory is relative to the
|
28 | 35 | # documentation root, use os.path.abspath to make it absolute, like shown here.
|
29 | 36 | sys.path.append(os.path.abspath('../sphinxext'))
|
30 | 37 |
|
31 |
| -# -- General configuration ----------------------------------------------------- |
| 38 | +# -- General configuration ---------------------------------------------------- |
32 | 39 |
|
33 | 40 | # We load the nibabel release info into a dict by explicit execution
|
34 | 41 | rel = {}
|
35 |
| -execfile('../../nibabel/info.py', rel) |
| 42 | +with open(os.path.join('..', '..', 'nibabel', 'info.py'), 'r') as fobj: |
| 43 | + exec(fobj.read(), rel) |
36 | 44 |
|
37 | 45 | # Write long description from info
|
38 | 46 | with open('_long_description.inc', 'wt') as fobj:
|
39 | 47 | fobj.write(rel['LONG_DESCRIPTION'])
|
40 | 48 |
|
41 |
| -# Add any Sphinx extension module names here, as strings. They can be extensions |
42 |
| -# coming with Sphinx (named 'sphinx.ext.*') or your custom ones. |
| 49 | +# Add any Sphinx extension module names here, as strings. They can be |
| 50 | +# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones. |
43 | 51 | extensions = ['sphinx.ext.autodoc',
|
44 | 52 | 'sphinx.ext.doctest',
|
45 | 53 | #'sphinx.ext.intersphinx',
|
46 | 54 | 'sphinx.ext.todo',
|
47 | 55 | 'sphinx.ext.mathjax',
|
48 | 56 | 'sphinx.ext.inheritance_diagram',
|
49 | 57 | 'sphinx.ext.autosummary',
|
50 |
| - 'math_dollar', # has to go before numpydoc |
51 |
| - # we have a local copy of the extension, imported from NumPy 1.3 |
52 |
| - # this also includes the docscrape* extensions |
| 58 | + 'math_dollar', # has to go before numpydoc |
53 | 59 | 'numpydoc',
|
54 | 60 | 'only_directives',
|
55 | 61 | 'plot_directive',
|
|
104 | 110 | # for source files.
|
105 | 111 | exclude_trees = ['_build']
|
106 | 112 |
|
107 |
| -# The reST default role (used for this markup: `text`) to use for all documents. |
| 113 | +# The reST default role (used for this markup: `text`) to use for all documents |
108 | 114 | #default_role = None
|
109 | 115 |
|
110 | 116 | # If true, '()' will be appended to :func: etc. cross-reference text.
|
|
124 | 130 | # A list of ignored prefixes for module index sorting.
|
125 | 131 | #modindex_common_prefix = []
|
126 | 132 |
|
127 |
| -# -- Sphinxext configuration --------------------------------------------------- |
| 133 | +# -- Sphinxext configuration -------------------------------------------------- |
128 | 134 |
|
129 | 135 | # Set attributes for layout of inheritance diagrams
|
130 | 136 | inheritance_graph_attrs = dict(rankdir="LR", size='"6.0, 8.0"', fontsize=14,
|
|
135 | 141 | # Flag to show todo items in rendered output
|
136 | 142 | todo_include_todos = True
|
137 | 143 |
|
138 |
| -# -- Options for HTML output --------------------------------------------------- |
| 144 | +# -- Options for HTML output -------------------------------------------------- |
139 | 145 |
|
140 | 146 | # The theme to use for HTML and HTML Help pages. Major themes that come with
|
141 | 147 | # Sphinx are currently 'default' and 'sphinxdoc'.
|
|
218 | 224 |
|
219 | 225 | mathjax_path = 'https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'
|
220 | 226 |
|
221 |
| -# -- Options for LaTeX output -------------------------------------------------- |
| 227 | +# -- Options for LaTeX output ------------------------------------------------- |
222 | 228 |
|
223 | 229 | # The paper size ('letter' or 'a4').
|
224 | 230 | #latex_paper_size = 'letter'
|
|
227 | 233 | #latex_font_size = '10pt'
|
228 | 234 |
|
229 | 235 | # Grouping the document tree into LaTeX files. List of tuples
|
230 |
| -# (source start file, target name, title, author, documentclass [howto/manual]). |
| 236 | +# (source start file, target name, title, author, |
| 237 | +# documentclass [howto/manual]). |
231 | 238 | latex_documents = [
|
232 |
| - ('index', 'nibabel.tex', u'NiBabel Documentation', |
233 |
| - u'NiBabel Authors', 'manual'), |
234 |
| -] |
| 239 | + ('index', 'nibabel.tex', u'NiBabel Documentation', u'NiBabel Authors', |
| 240 | + 'manual')] |
235 | 241 |
|
236 | 242 | # The name of an image file (relative to this directory) to place at the top of
|
237 | 243 | # the title page.
|
|
0 commit comments