##// END OF EJS Templates
allow docs to build on http://readthedocs.org/
Bussonnier Matthias -
Show More
@@ -1,200 +1,232 b''
1 # -*- coding: utf-8 -*-
1 # -*- coding: utf-8 -*-
2 #
2 #
3 # IPython documentation build configuration file.
3 # IPython documentation build configuration file.
4
4
5 # NOTE: This file has been edited manually from the auto-generated one from
5 # NOTE: This file has been edited manually from the auto-generated one from
6 # sphinx. Do NOT delete and re-generate. If any changes from sphinx are
6 # sphinx. Do NOT delete and re-generate. If any changes from sphinx are
7 # needed, generate a scratch one and merge by hand any new fields needed.
7 # needed, generate a scratch one and merge by hand any new fields needed.
8
8
9 #
9 #
10 # This file is execfile()d with the current directory set to its containing dir.
10 # This file is execfile()d with the current directory set to its containing dir.
11 #
11 #
12 # The contents of this file are pickled, so don't put values in the namespace
12 # The contents of this file are pickled, so don't put values in the namespace
13 # that aren't pickleable (module imports are okay, they're removed automatically).
13 # that aren't pickleable (module imports are okay, they're removed automatically).
14 #
14 #
15 # All configuration values have a default value; values that are commented out
15 # All configuration values have a default value; values that are commented out
16 # serve to show the default value.
16 # serve to show the default value.
17
17
18 import sys, os
18 import sys, os
19
19
20 ON_RTD = os.environ.get('READTHEDOCS', None) == 'True'
21
22 if ON_RTD:
23 # Mock the presence of matplotlib, which we don't have on RTD
24 # see
25 # http://read-the-docs.readthedocs.org/en/latest/faq.html
26
27 class Mock(object):
28 def __init__(self, *args, **kwargs):
29 pass
30
31 def __call__(self, *args, **kwargs):
32 return Mock()
33
34 @classmethod
35 def __getattr__(self, name):
36 if name in ('__file__', '__path__'):
37 return '/dev/null'
38 elif name[0] == name[0].upper():
39 return type(name, (), {})
40 else:
41 return Mock()
42
43 MOCK_MODULES = ['matplotlib', 'matplotlib.sphinxext', 'numpy']
44 for mod_name in MOCK_MODULES:
45 sys.modules[mod_name] = Mock()
46
20 # If your extensions are in another directory, add it here. If the directory
47 # If your extensions are in another directory, add it here. If the directory
21 # is relative to the documentation root, use os.path.abspath to make it
48 # is relative to the documentation root, use os.path.abspath to make it
22 # absolute, like shown here.
49 # absolute, like shown here.
23 sys.path.insert(0, os.path.abspath('../sphinxext'))
50 sys.path.insert(0, os.path.abspath('../sphinxext'))
24
51
25 # Import support for ipython console session syntax highlighting (lives
52 # Import support for ipython console session syntax highlighting (lives
26 # in the sphinxext directory defined above)
53 # in the sphinxext directory defined above)
27 import ipython_console_highlighting
54 import ipython_console_highlighting
28
55
29 # We load the ipython release info into a dict by explicit execution
56 # We load the ipython release info into a dict by explicit execution
30 iprelease = {}
57 iprelease = {}
31 execfile('../../IPython/core/release.py',iprelease)
58 execfile('../../IPython/core/release.py',iprelease)
32
59
33 # General configuration
60 # General configuration
34 # ---------------------
61 # ---------------------
35
62
36 # Add any Sphinx extension module names here, as strings. They can be extensions
63 # Add any Sphinx extension module names here, as strings. They can be extensions
37 # coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
64 # coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
38 extensions = [
65 extensions = [
39 # 'matplotlib.sphinxext.mathmpl',
66 # 'matplotlib.sphinxext.mathmpl',
40 'matplotlib.sphinxext.only_directives',
67 'matplotlib.sphinxext.only_directives',
41 # 'matplotlib.sphinxext.plot_directive',
68 # 'matplotlib.sphinxext.plot_directive',
42 'sphinx.ext.autodoc',
69 'sphinx.ext.autodoc',
43 'sphinx.ext.doctest',
70 'sphinx.ext.doctest',
44 'inheritance_diagram',
71 'inheritance_diagram',
45 'ipython_console_highlighting',
72 'ipython_console_highlighting',
46 'ipython_directive',
73 'ipython_directive',
47 'numpydoc', # to preprocess docstrings
74 'numpydoc', # to preprocess docstrings
48 'github', # for easy GitHub links
75 'github', # for easy GitHub links
49 ]
76 ]
50
77
78 if ON_RTD:
79 # Remove extensions not currently supported on RTD
80 extensions.remove('matplotlib.sphinxext.only_directives')
81 extensions.remove('ipython_directive')
82
51 # Add any paths that contain templates here, relative to this directory.
83 # Add any paths that contain templates here, relative to this directory.
52 templates_path = ['_templates']
84 templates_path = ['_templates']
53
85
54 # The suffix of source filenames.
86 # The suffix of source filenames.
55 source_suffix = '.txt'
87 source_suffix = '.txt'
56
88
57 # The master toctree document.
89 # The master toctree document.
58 master_doc = 'index'
90 master_doc = 'index'
59
91
60 # General substitutions.
92 # General substitutions.
61 project = 'IPython'
93 project = 'IPython'
62 copyright = '2008, The IPython Development Team'
94 copyright = '2008, The IPython Development Team'
63
95
64 # ghissue config
96 # ghissue config
65 github_project_url = "https://github.com/ipython/ipython"
97 github_project_url = "https://github.com/ipython/ipython"
66
98
67 # The default replacements for |version| and |release|, also used in various
99 # The default replacements for |version| and |release|, also used in various
68 # other places throughout the built documents.
100 # other places throughout the built documents.
69 #
101 #
70 # The full version, including alpha/beta/rc tags.
102 # The full version, including alpha/beta/rc tags.
71 release = iprelease['version']
103 release = iprelease['version']
72 # The short X.Y version.
104 # The short X.Y version.
73 version = '.'.join(release.split('.',2)[:2])
105 version = '.'.join(release.split('.',2)[:2])
74
106
75
107
76 # There are two options for replacing |today|: either, you set today to some
108 # There are two options for replacing |today|: either, you set today to some
77 # non-false value, then it is used:
109 # non-false value, then it is used:
78 #today = ''
110 #today = ''
79 # Else, today_fmt is used as the format for a strftime call.
111 # Else, today_fmt is used as the format for a strftime call.
80 today_fmt = '%B %d, %Y'
112 today_fmt = '%B %d, %Y'
81
113
82 # List of documents that shouldn't be included in the build.
114 # List of documents that shouldn't be included in the build.
83 #unused_docs = []
115 #unused_docs = []
84
116
85 # List of directories, relative to source directories, that shouldn't be searched
117 # List of directories, relative to source directories, that shouldn't be searched
86 # for source files.
118 # for source files.
87 exclude_dirs = ['attic']
119 exclude_dirs = ['attic']
88
120
89 # If true, '()' will be appended to :func: etc. cross-reference text.
121 # If true, '()' will be appended to :func: etc. cross-reference text.
90 #add_function_parentheses = True
122 #add_function_parentheses = True
91
123
92 # If true, the current module name will be prepended to all description
124 # If true, the current module name will be prepended to all description
93 # unit titles (such as .. function::).
125 # unit titles (such as .. function::).
94 #add_module_names = True
126 #add_module_names = True
95
127
96 # If true, sectionauthor and moduleauthor directives will be shown in the
128 # If true, sectionauthor and moduleauthor directives will be shown in the
97 # output. They are ignored by default.
129 # output. They are ignored by default.
98 #show_authors = False
130 #show_authors = False
99
131
100 # The name of the Pygments (syntax highlighting) style to use.
132 # The name of the Pygments (syntax highlighting) style to use.
101 pygments_style = 'sphinx'
133 pygments_style = 'sphinx'
102
134
103
135
104 # Options for HTML output
136 # Options for HTML output
105 # -----------------------
137 # -----------------------
106
138
107 # The style sheet to use for HTML and HTML Help pages. A file of that name
139 # The style sheet to use for HTML and HTML Help pages. A file of that name
108 # must exist either in Sphinx' static/ path, or in one of the custom paths
140 # must exist either in Sphinx' static/ path, or in one of the custom paths
109 # given in html_static_path.
141 # given in html_static_path.
110 html_style = 'default.css'
142 html_style = 'default.css'
111
143
112 # The name for this set of Sphinx documents. If None, it defaults to
144 # The name for this set of Sphinx documents. If None, it defaults to
113 # "<project> v<release> documentation".
145 # "<project> v<release> documentation".
114 #html_title = None
146 #html_title = None
115
147
116 # The name of an image file (within the static path) to place at the top of
148 # The name of an image file (within the static path) to place at the top of
117 # the sidebar.
149 # the sidebar.
118 #html_logo = None
150 #html_logo = None
119
151
120 # Add any paths that contain custom static files (such as style sheets) here,
152 # Add any paths that contain custom static files (such as style sheets) here,
121 # relative to this directory. They are copied after the builtin static files,
153 # relative to this directory. They are copied after the builtin static files,
122 # so a file named "default.css" will overwrite the builtin "default.css".
154 # so a file named "default.css" will overwrite the builtin "default.css".
123 html_static_path = ['_static']
155 html_static_path = ['_static']
124
156
125 # If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
157 # If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
126 # using the given strftime format.
158 # using the given strftime format.
127 html_last_updated_fmt = '%b %d, %Y'
159 html_last_updated_fmt = '%b %d, %Y'
128
160
129 # If true, SmartyPants will be used to convert quotes and dashes to
161 # If true, SmartyPants will be used to convert quotes and dashes to
130 # typographically correct entities.
162 # typographically correct entities.
131 #html_use_smartypants = True
163 #html_use_smartypants = True
132
164
133 # Custom sidebar templates, maps document names to template names.
165 # Custom sidebar templates, maps document names to template names.
134 #html_sidebars = {}
166 #html_sidebars = {}
135
167
136 # Additional templates that should be rendered to pages, maps page names to
168 # Additional templates that should be rendered to pages, maps page names to
137 # template names.
169 # template names.
138 #html_additional_pages = {}
170 #html_additional_pages = {}
139
171
140 # If false, no module index is generated.
172 # If false, no module index is generated.
141 #html_use_modindex = True
173 #html_use_modindex = True
142
174
143 # If true, the reST sources are included in the HTML build as _sources/<name>.
175 # If true, the reST sources are included in the HTML build as _sources/<name>.
144 #html_copy_source = True
176 #html_copy_source = True
145
177
146 # If true, an OpenSearch description file will be output, and all pages will
178 # If true, an OpenSearch description file will be output, and all pages will
147 # contain a <link> tag referring to it. The value of this option must be the
179 # contain a <link> tag referring to it. The value of this option must be the
148 # base URL from which the finished HTML is served.
180 # base URL from which the finished HTML is served.
149 #html_use_opensearch = ''
181 #html_use_opensearch = ''
150
182
151 # If nonempty, this is the file name suffix for HTML files (e.g. ".xhtml").
183 # If nonempty, this is the file name suffix for HTML files (e.g. ".xhtml").
152 #html_file_suffix = ''
184 #html_file_suffix = ''
153
185
154 # Output file base name for HTML help builder.
186 # Output file base name for HTML help builder.
155 htmlhelp_basename = 'ipythondoc'
187 htmlhelp_basename = 'ipythondoc'
156
188
157
189
158 # Options for LaTeX output
190 # Options for LaTeX output
159 # ------------------------
191 # ------------------------
160
192
161 # The paper size ('letter' or 'a4').
193 # The paper size ('letter' or 'a4').
162 latex_paper_size = 'letter'
194 latex_paper_size = 'letter'
163
195
164 # The font size ('10pt', '11pt' or '12pt').
196 # The font size ('10pt', '11pt' or '12pt').
165 latex_font_size = '11pt'
197 latex_font_size = '11pt'
166
198
167 # Grouping the document tree into LaTeX files. List of tuples
199 # Grouping the document tree into LaTeX files. List of tuples
168 # (source start file, target name, title, author, document class [howto/manual]).
200 # (source start file, target name, title, author, document class [howto/manual]).
169
201
170 latex_documents = [
202 latex_documents = [
171 ('index', 'ipython.tex', 'IPython Documentation',
203 ('index', 'ipython.tex', 'IPython Documentation',
172 ur"""The IPython Development Team""", 'manual', True),
204 ur"""The IPython Development Team""", 'manual', True),
173 ('parallel/winhpc_index', 'winhpc_whitepaper.tex',
205 ('parallel/winhpc_index', 'winhpc_whitepaper.tex',
174 'Using IPython on Windows HPC Server 2008',
206 'Using IPython on Windows HPC Server 2008',
175 ur"Brian E. Granger", 'manual', True)
207 ur"Brian E. Granger", 'manual', True)
176 ]
208 ]
177
209
178 # The name of an image file (relative to this directory) to place at the top of
210 # The name of an image file (relative to this directory) to place at the top of
179 # the title page.
211 # the title page.
180 #latex_logo = None
212 #latex_logo = None
181
213
182 # For "manual" documents, if this is true, then toplevel headings are parts,
214 # For "manual" documents, if this is true, then toplevel headings are parts,
183 # not chapters.
215 # not chapters.
184 #latex_use_parts = False
216 #latex_use_parts = False
185
217
186 # Additional stuff for the LaTeX preamble.
218 # Additional stuff for the LaTeX preamble.
187 #latex_preamble = ''
219 #latex_preamble = ''
188
220
189 # Documents to append as an appendix to all manuals.
221 # Documents to append as an appendix to all manuals.
190 #latex_appendices = []
222 #latex_appendices = []
191
223
192 # If false, no module index is generated.
224 # If false, no module index is generated.
193 latex_use_modindex = True
225 latex_use_modindex = True
194
226
195
227
196 # Cleanup
228 # Cleanup
197 # -------
229 # -------
198 # delete release info to avoid pickling errors from sphinx
230 # delete release info to avoid pickling errors from sphinx
199
231
200 del iprelease
232 del iprelease
General Comments 0
You need to be logged in to leave comments. Login now