@@ -14,38 +14,46 @@ developers guide.
14
14
Building the docs
15
15
=================
16
16
17
- You need to have `Sphinx <http://sphinx-doc.org/ >`_ installed; it is the toolset
18
- used to build the docs. It is not included in this tree, but maintained
19
- separately and `available from PyPI <https://pypi.python.org/pypi/Sphinx >`_.
17
+ The documentation is built with several tools which are not included in this
18
+ tree but are maintained separately and are available from
19
+ `PyPI <https://pypi.org/ >`_.
20
+
21
+ * `Sphinx <https://pypi.org/project/Sphinx/ >`_
22
+ * `blurb <https://pypi.org/project/blurb/ >`_
23
+
24
+ The easiest way to install these tools is to create a virtual environment and
25
+ install the tools into there.
20
26
21
27
22
28
Using make
23
29
----------
24
30
25
- A Makefile has been prepared so that on Unix, provided you have installed
26
- Sphinx, you can just run ::
31
+ To get started on UNIX, you can create a virtual environment with the command ::
27
32
28
- make html
33
+ make venv
29
34
30
- to build the HTML output files.
31
-
32
- On Windows, we try to emulate the Makefile as closely as possible with a
33
- `` make.bat `` file.
35
+ That will install all the tools necessary to build the documentation. Assuming
36
+ the virtual environment was created in the `` env `` directory (the default;
37
+ configurable with the VENVDIR variable), you can run the following command to
38
+ build the HTML output files::
34
39
35
- To use a Python interpreter that's not called ``python ``, use the standard
36
- way to set Makefile variables, using e.g. ::
40
+ make html
37
41
38
- make html PYTHON=python3
42
+ By default, if the virtual environment is not created, the Makefile will
43
+ look for instances of sphinxbuild and blurb installed on your process PATH
44
+ (configurable with the SPHINXBUILD and BLURB variables).
39
45
40
- On Windows, set the PYTHON environment variable instead.
41
-
42
- To use a specific sphinx-build (something other than ``sphinx-build ``), set
43
- the SPHINXBUILD variable.
46
+ On Windows, we try to emulate the Makefile as closely as possible with a
47
+ ``make.bat `` file. If you need to specify the Python interpreter to use,
48
+ set the PYTHON environment variable instead.
44
49
45
50
Available make targets are:
46
51
47
52
* "clean", which removes all build files.
48
53
54
+ * "venv", which creates a virtual environment with all necessary tools
55
+ installed.
56
+
49
57
* "html", which builds standalone HTML files for offline viewing.
50
58
51
59
* "htmlview", which re-uses the "html" builder, but then opens the main page
@@ -96,7 +104,7 @@ Available make targets are:
96
104
Without make
97
105
------------
98
106
99
- Install the Sphinx package and its dependencies from PyPI.
107
+ First, install the tool dependencies from PyPI.
100
108
101
109
Then, from the ``Doc `` directory, run ::
102
110
@@ -112,8 +120,7 @@ Contributing
112
120
Bugs in the content should be reported to the
113
121
`Python bug tracker <https://bugs.python.org >`_.
114
122
115
- Bugs in the toolset should be reported in the
116
- `Sphinx bug tracker <https://github.com/sphinx-doc/sphinx/issues >`_.
123
+ Bugs in the toolset should be reported to the tools themselves.
117
124
118
125
You can also send a mail to the Python Documentation Team at docs@python.org,
119
126
and we will process your request as soon as possible.
0 commit comments