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