@@ -15,13 +15,14 @@ the Sphinx_ documentation generation tool. There are several extra requirements
1515that are needed to build the documentation. They are listed in
1616:file: `doc-requirements.txt ` and listed below:
1717
18- 1. Sphinx 1.3 or later (1.5.0 is not supported)
19- 2. numpydoc 0.4 or later
20- 3. IPython
21- 4. mock
22- 5. colorspacious
23- 6. Pillow
24- 7. Graphviz
18+ * Sphinx>=1.3, !=1.5.0, !=1.6.4
19+ * colorspacious
20+ * IPython
21+ * mock
22+ * numpydoc>=0.4
23+ * Pillow
24+ * sphinx-gallery>=0.1.12
25+ * graphviz
2526
2627.. note ::
2728
@@ -69,24 +70,41 @@ Building the docs
6970-----------------
7071
7172The documentation sources are found in the :file: `doc/ ` directory in the trunk.
72- To build the documentation in html format, cd into :file: `doc/ ` and run:
73+ To build the documentation in html format, cd into :file: `doc/ ` and run
7374
7475.. code-block :: sh
7576
76- python make.py html
77+ make html
7778
78- The list of commands and flags for ``make.py `` can be listed by running
79- ``python make.py --help ``. In particular,
79+ Other useful invocations include
8080
81- * ``python make.py clean `` will delete the built Sphinx files. Use this command
82- if you're getting strange errors about missing paths or broken links,
83- particularly if you move files around.
84- * ``python make.py latex `` builds a PDF of the documentation.
85- * The ``--allowsphinxwarnings `` flag allows the docs to continue building even
86- if Sphinx throws a warning. This is useful for debugging and spot-checking
87- many warnings at once.
81+ .. code-block :: sh
82+
83+ # Delete built files. May help if you get errors about missing paths or
84+ # broken links.
85+ make clean
86+
87+ # Build pdf docs.
88+ make latexpdf
89+
90+ The ``SPHINXOPTS `` variable is set to ``-W `` by default to turn warnings into
91+ errors. To unset it, use
92+
93+ .. code-block :: sh
94+
95+ make SPHINXOPTS= html
96+
97+ You can use the ``O `` variable to set additional options:
98+
99+ * ``make O=-j4 html `` runs a parallel build with 4 processes.
100+ * ``make O=-Dplot_formats=png:100 html `` saves figures in low resolution.
101+ * ``make O=-Dplot_gallery=0 html `` skips the gallery build.
102+
103+ Multiple options can be combined using e.g. ``make O='-j4 -Dplot_gallery=0'
104+ html ``.
88105
89- .. _formatting-mpl-docs :
106+ On Windows, options needs to be set as environment variables, e.g. ``set O=-W
107+ -j4 & make html ``.
90108
91109Writing new documentation
92110=========================
0 commit comments