##// END OF EJS Templates
Allow to rebuild docs with Warning this is an old version.
Matthias Bussonnier -
Show More
@@ -1,165 +1,167 b''
1 1 # Makefile for Sphinx documentation
2 2 #
3 3
4 4 # You can set these variables from the command line.
5 5 SPHINXOPTS =
6 6 SPHINXBUILD = sphinx-build
7 7 PAPER =
8 8 SRCDIR = source
9 9 BUILDDIR = build
10 10
11 11 # Internal variables.
12 12 PAPEROPT_a4 = -D latex_paper_size=a4
13 13 PAPEROPT_letter = -D latex_paper_size=letter
14 14 ALLSPHINXOPTS = -d build/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) $(SRCDIR)
15 15
16 16 .PHONY: help clean html web pickle htmlhelp latex changes linkcheck api
17 17
18 18 default: html
19 19
20 20 help:
21 21 @echo "Please use \`make <target>' where <target> is one of"
22 22 @echo " html standalone HTML files"
23 23 @echo " html_noapi same as above, without the time consuming API docs"
24 24 @echo " pickle pickle files (usable by e.g. sphinx-web)"
25 25 @echo " htmlhelp HTML files and a HTML help project"
26 26 @echo " latex LaTeX files, you can set PAPER=a4 or PAPER=letter"
27 27 @echo " texinfo Texinfo files"
28 28 @echo " info Texinfo files and run them through makeinfo"
29 29 @echo " changes an overview over all changed/added/deprecated items"
30 30 @echo " linkcheck check all external links for integrity (takes a long time)"
31 31 @echo
32 32 @echo "Compound utility targets:"
33 33 @echo "pdf latex and then runs the PDF generation"
34 34 @echo "all html and pdf"
35 35 @echo "dist all, and then puts the results in dist/"
36 36 @echo "gitwash-update update git workflow from source repo"
37 37
38 38 clean_api:
39 39 -rm -rf $(SRCDIR)/api/generated
40 40
41 41 clean: clean_api
42 42 -rm -rf build/* dist/*
43 43 -cd $(SRCDIR)/config/options; test -f generated && cat generated | xargs rm -f
44 44 -rm -rf $(SRCDIR)/config/options/generated
45 45 -rm -f $(SRCDIR)/interactive/magics-generated.txt
46 46
47 47 pdf: latex
48 48 cd build/latex && make all-pdf
49 49
50 50 all: html pdf
51 51
52 52 # For final distribution, only build HTML (our pdf is now so large as to be
53 53 # unusable, takes forever to build and just bloats the downloads). We leave
54 54 # them hardlinked at the top-level so users find them easily, though the
55 55 # original build/html dir is left in-place (useful to reload builds while
56 56 # testing).
57 57 dist: html
58 58 rm -rf html
59 59 cp -al build/html .
60 60 @echo "Build finished. Final docs are in html/"
61 61
62 62 html: jsapi api autoconfig automagic
63 63 html_noapi: clean_api autoconfig automagic
64 64
65 65 html html_noapi:
66 66 mkdir -p build/html build/doctrees
67 67 $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) build/html
68 68 @echo
69 69 @echo "Build finished. The HTML pages are in build/html."
70 70
71 71 automagic: source/interactive/magics-generated.txt
72 72
73 73 source/interactive/magics-generated.txt: autogen_magics.py
74 74 python autogen_magics.py
75 75 @echo "Created docs for line & cell magics"
76 76
77 77 autoconfig: source/config/options/generated
78 78
79 79 source/config/options/generated:
80 80 python autogen_config.py
81 81 @echo "Created docs for config options"
82 82
83 83 jsapi:
84 84 jsdoc -c jsdoc_config.json -d ./build/jsapi_html/
85 85
86 86 api: source/api/generated/gen.txt
87 87
88 88 source/api/generated/gen.txt:
89 89 python autogen_api.py
90 90 @echo "Build API docs finished."
91 91
92 92 pickle:
93 93 mkdir -p build/pickle build/doctrees
94 94 $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) build/pickle
95 95 @echo
96 96 @echo "Build finished; now you can process the pickle files or run"
97 97 @echo " sphinx-web build/pickle"
98 98 @echo "to start the sphinx-web server."
99 99
100 100 web: pickle
101 101
102 102 htmlhelp:
103 103 mkdir -p build/htmlhelp build/doctrees
104 104 $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) build/htmlhelp
105 105 @echo
106 106 @echo "Build finished; now you can run HTML Help Workshop with the" \
107 107 ".hhp project file in build/htmlhelp."
108 108
109 109 qthelp:
110 110 mkdir -p build/qthelp
111 111 $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) build/qthelp
112 112 @echo
113 113 @echo "Build finished; now you can run "qcollectiongenerator" with the" \
114 114 ".qhcp project file in $(BUILDDIR)/qthelp, like this:"
115 115 @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/IPython.qhcp"
116 116 @echo "To view the help file:"
117 117 @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/IPython.qhc"
118 118
119 119 latex: api autoconfig
120 120 mkdir -p build/latex build/doctrees
121 121 $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) build/latex
122 122 @echo
123 123 @echo "Build finished; the LaTeX files are in build/latex."
124 124 @echo "Run \`make all-pdf' or \`make all-ps' in that directory to" \
125 125 "run these through (pdf)latex."
126 126
127 127 changes:
128 128 mkdir -p build/changes build/doctrees
129 129 $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) build/changes
130 130 @echo
131 131 @echo "The overview file is in build/changes."
132 132
133 133 linkcheck:
134 134 mkdir -p build/linkcheck build/doctrees
135 135 $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) build/linkcheck
136 136 @echo
137 137 @echo "Link check complete; look for any errors in the above output " \
138 138 "or in build/linkcheck/output.rst."
139 139
140 140 gitwash-update:
141 141 python ../tools/gitwash_dumper.py source/development ipython
142 142
143 143 nightly: dist
144 144 rsync -avH --delete dist/ ipython:www/doc/nightly
145 145
146 146 gh-pages: clean html
147 147 # if VERSION is unspecified, it will be dev
148 148 # For releases, VERSION should be just the major version,
149 149 # e.g. VERSION=2 make gh-pages
150 # use ARCHIVE=1 VERSION=3 gh-pages to build the
151 # docs with a warning that this is not stable docs anymore.
150 152 python gh-pages.py $(VERSION)
151 153
152 154 texinfo:
153 155 mkdir -p $(BUILDDIR)/texinfo
154 156 $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
155 157 @echo
156 158 @echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo."
157 159 @echo "Run \`make' in that directory to run these through makeinfo" \
158 160 "(use \`make info' here to do that automatically)."
159 161
160 162 info:
161 163 mkdir -p $(BUILDDIR)/texinfo
162 164 $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
163 165 @echo "Running Texinfo files through makeinfo..."
164 166 make -C $(BUILDDIR)/texinfo info
165 167 @echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo."
@@ -1,253 +1,262 b''
1 1 # -*- coding: utf-8 -*-
2 2 #
3 3 # IPython documentation build configuration file.
4 4
5 5 # NOTE: This file has been edited manually from the auto-generated one from
6 6 # sphinx. Do NOT delete and re-generate. If any changes from sphinx are
7 7 # needed, generate a scratch one and merge by hand any new fields needed.
8 8
9 9 #
10 10 # This file is execfile()d with the current directory set to its containing dir.
11 11 #
12 12 # The contents of this file are pickled, so don't put values in the namespace
13 13 # that aren't pickleable (module imports are okay, they're removed automatically).
14 14 #
15 15 # All configuration values have a default value; values that are commented out
16 16 # serve to show the default value.
17 17
18 18 import sys, os
19 19
20 20 ON_RTD = os.environ.get('READTHEDOCS', None) == 'True'
21 21
22 22 if ON_RTD:
23 23 # Mock the presence of matplotlib, which we don't have on RTD
24 24 # see
25 25 # http://read-the-docs.readthedocs.org/en/latest/faq.html
26 26 tags.add('rtd')
27 27
28 28 # If your extensions are in another directory, add it here. If the directory
29 29 # is relative to the documentation root, use os.path.abspath to make it
30 30 # absolute, like shown here.
31 31 sys.path.insert(0, os.path.abspath('../sphinxext'))
32 32
33 33 # We load the ipython release info into a dict by explicit execution
34 34 iprelease = {}
35 35 exec(compile(open('../../IPython/core/release.py').read(), '../../IPython/core/release.py', 'exec'),iprelease)
36 36
37 37 # General configuration
38 38 # ---------------------
39 39
40 40 # Add any Sphinx extension module names here, as strings. They can be extensions
41 41 # coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
42 42 extensions = [
43 43 'matplotlib.sphinxext.mathmpl',
44 44 'matplotlib.sphinxext.only_directives',
45 45 'matplotlib.sphinxext.plot_directive',
46 46 'sphinx.ext.autodoc',
47 47 'sphinx.ext.autosummary',
48 48 'sphinx.ext.doctest',
49 49 'sphinx.ext.inheritance_diagram',
50 50 'sphinx.ext.intersphinx',
51 51 'IPython.sphinxext.ipython_console_highlighting',
52 52 'IPython.sphinxext.ipython_directive',
53 53 'numpydoc', # to preprocess docstrings
54 54 'github', # for easy GitHub links
55 55 'magics',
56 56 ]
57 57
58 58 if ON_RTD:
59 59 # Remove extensions not currently supported on RTD
60 60 extensions.remove('matplotlib.sphinxext.only_directives')
61 61 extensions.remove('matplotlib.sphinxext.mathmpl')
62 62 extensions.remove('matplotlib.sphinxext.plot_directive')
63 63 extensions.remove('IPython.sphinxext.ipython_directive')
64 64 extensions.remove('IPython.sphinxext.ipython_console_highlighting')
65 65
66 66 # Add any paths that contain templates here, relative to this directory.
67 67 templates_path = ['_templates']
68 68
69 69 # The suffix of source filenames.
70 70 source_suffix = '.rst'
71 71
72 72 if iprelease['_version_extra'] == 'dev':
73 73 rst_prolog = """
74 74 .. note::
75 75
76 76 This documentation is for a development version of IPython. There may be
77 77 significant differences from the latest stable release.
78 78
79 79 """
80 80
81 elif os.environ.get('ARCHIVE', None):
82 rst_prolog = """
83 .. warning::
84
85 This documentation is for an old version of IPython.
86 You can find docs for newer versions `here <http://ipython.readthedocs.org/en/stable/>`_.
87
88 """
89
81 90 # The master toctree document.
82 91 master_doc = 'index'
83 92
84 93 # General substitutions.
85 94 project = 'IPython'
86 95 copyright = 'The IPython Development Team'
87 96
88 97 # ghissue config
89 98 github_project_url = "https://github.com/ipython/ipython"
90 99
91 100 # numpydoc config
92 101 numpydoc_show_class_members = False # Otherwise Sphinx emits thousands of warnings
93 102 numpydoc_class_members_toctree = False
94 103
95 104 # The default replacements for |version| and |release|, also used in various
96 105 # other places throughout the built documents.
97 106 #
98 107 # The full version, including alpha/beta/rc tags.
99 108 release = "%s" % iprelease['version']
100 109 # Just the X.Y.Z part, no '-dev'
101 110 version = iprelease['version'].split('-', 1)[0]
102 111
103 112
104 113 # There are two options for replacing |today|: either, you set today to some
105 114 # non-false value, then it is used:
106 115 #today = ''
107 116 # Else, today_fmt is used as the format for a strftime call.
108 117 today_fmt = '%B %d, %Y'
109 118
110 119 # List of documents that shouldn't be included in the build.
111 120 #unused_docs = []
112 121
113 122 # Exclude these glob-style patterns when looking for source files. They are
114 123 # relative to the source/ directory.
115 124 exclude_patterns = ['whatsnew/pr']
116 125
117 126
118 127 # If true, '()' will be appended to :func: etc. cross-reference text.
119 128 #add_function_parentheses = True
120 129
121 130 # If true, the current module name will be prepended to all description
122 131 # unit titles (such as .. function::).
123 132 #add_module_names = True
124 133
125 134 # If true, sectionauthor and moduleauthor directives will be shown in the
126 135 # output. They are ignored by default.
127 136 #show_authors = False
128 137
129 138 # The name of the Pygments (syntax highlighting) style to use.
130 139 pygments_style = 'sphinx'
131 140
132 141 # Set the default role so we can use `foo` instead of ``foo``
133 142 default_role = 'literal'
134 143
135 144 # Options for HTML output
136 145 # -----------------------
137 146
138 147 # The style sheet to use for HTML and HTML Help pages. A file of that name
139 148 # must exist either in Sphinx' static/ path, or in one of the custom paths
140 149 # given in html_static_path.
141 150 html_style = 'default.css'
142 151
143 152 # The name for this set of Sphinx documents. If None, it defaults to
144 153 # "<project> v<release> documentation".
145 154 #html_title = None
146 155
147 156 # The name of an image file (within the static path) to place at the top of
148 157 # the sidebar.
149 158 #html_logo = None
150 159
151 160 # Add any paths that contain custom static files (such as style sheets) here,
152 161 # relative to this directory. They are copied after the builtin static files,
153 162 # so a file named "default.css" will overwrite the builtin "default.css".
154 163 html_static_path = ['_static']
155 164
156 165 # If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
157 166 # using the given strftime format.
158 167 html_last_updated_fmt = '%b %d, %Y'
159 168
160 169 # If true, SmartyPants will be used to convert quotes and dashes to
161 170 # typographically correct entities.
162 171 #html_use_smartypants = True
163 172
164 173 # Custom sidebar templates, maps document names to template names.
165 174 #html_sidebars = {}
166 175
167 176 # Additional templates that should be rendered to pages, maps page names to
168 177 # template names.
169 178 html_additional_pages = {
170 179 'interactive/htmlnotebook': 'notebook_redirect.html',
171 180 'interactive/notebook': 'notebook_redirect.html',
172 181 'interactive/nbconvert': 'notebook_redirect.html',
173 182 'interactive/public_server': 'notebook_redirect.html',
174 183 }
175 184
176 185 # If false, no module index is generated.
177 186 #html_use_modindex = True
178 187
179 188 # If true, the reST sources are included in the HTML build as _sources/<name>.
180 189 #html_copy_source = True
181 190
182 191 # If true, an OpenSearch description file will be output, and all pages will
183 192 # contain a <link> tag referring to it. The value of this option must be the
184 193 # base URL from which the finished HTML is served.
185 194 #html_use_opensearch = ''
186 195
187 196 # If nonempty, this is the file name suffix for HTML files (e.g. ".xhtml").
188 197 #html_file_suffix = ''
189 198
190 199 # Output file base name for HTML help builder.
191 200 htmlhelp_basename = 'ipythondoc'
192 201
193 202 intersphinx_mapping = {'python': ('http://docs.python.org/2/', None),
194 203 'rpy2': ('http://rpy.sourceforge.net/rpy2/doc-2.4/html/', None)}
195 204
196 205 # Options for LaTeX output
197 206 # ------------------------
198 207
199 208 # The paper size ('letter' or 'a4').
200 209 latex_paper_size = 'letter'
201 210
202 211 # The font size ('10pt', '11pt' or '12pt').
203 212 latex_font_size = '11pt'
204 213
205 214 # Grouping the document tree into LaTeX files. List of tuples
206 215 # (source start file, target name, title, author, document class [howto/manual]).
207 216
208 217 latex_documents = [
209 218 ('index', 'ipython.tex', 'IPython Documentation',
210 219 u"""The IPython Development Team""", 'manual', True),
211 220 ('parallel/winhpc_index', 'winhpc_whitepaper.tex',
212 221 'Using IPython on Windows HPC Server 2008',
213 222 u"Brian E. Granger", 'manual', True)
214 223 ]
215 224
216 225 # The name of an image file (relative to this directory) to place at the top of
217 226 # the title page.
218 227 #latex_logo = None
219 228
220 229 # For "manual" documents, if this is true, then toplevel headings are parts,
221 230 # not chapters.
222 231 #latex_use_parts = False
223 232
224 233 # Additional stuff for the LaTeX preamble.
225 234 #latex_preamble = ''
226 235
227 236 # Documents to append as an appendix to all manuals.
228 237 #latex_appendices = []
229 238
230 239 # If false, no module index is generated.
231 240 latex_use_modindex = True
232 241
233 242
234 243 # Options for texinfo output
235 244 # --------------------------
236 245
237 246 texinfo_documents = [
238 247 (master_doc, 'ipython', 'IPython Documentation',
239 248 'The IPython Development Team',
240 249 'IPython',
241 250 'IPython Documentation',
242 251 'Programming',
243 252 1),
244 253 ]
245 254
246 255 modindex_common_prefix = ['IPython.']
247 256
248 257
249 258 # Cleanup
250 259 # -------
251 260 # delete release info to avoid pickling errors from sphinx
252 261
253 262 del iprelease
General Comments 0
You need to be logged in to leave comments. Login now