blob: 8e0241096b458a8d0fb1ca7fb16d076d4c0c919b [file] [log] [blame]
Georg Brandl116aa622007-08-15 14:28:22 +00001Python Documentation README
2~~~~~~~~~~~~~~~~~~~~~~~~~~~
3
4This directory contains the reStructuredText (reST) sources to the Python
5documentation. You don't need to build them yourself, prebuilt versions are
Senthil Kumaranf3ddcc92014-04-09 11:44:34 -04006available at <https://docs.python.org/3.4/download.html>.
Georg Brandl116aa622007-08-15 14:28:22 +00007
8Documentation on the authoring Python documentation, including information about
9both style and markup, is available in the "Documenting Python" chapter of the
Georg Brandl02e77d12014-03-10 19:31:52 +010010developers guide <http://docs.python.org/devguide/documenting.html>.
Georg Brandl116aa622007-08-15 14:28:22 +000011
12
13Building the docs
14=================
15
Georg Brandl02e77d12014-03-10 19:31:52 +010016You need to have Sphinx <http://sphinx-doc.org/> installed; it is the toolset
17used to build the docs. It is not included in this tree, but maintained
18separately and available from PyPI <http://pypi.python.org/pypi/Sphinx>.
Georg Brandl116aa622007-08-15 14:28:22 +000019
20
21Using make
22----------
23
Georg Brandl02e77d12014-03-10 19:31:52 +010024A Makefile has been prepared so that on Unix, provided you have installed
25Sphinx, you can just run ::
Georg Brandl116aa622007-08-15 14:28:22 +000026
27 make html
28
Georg Brandl02e77d12014-03-10 19:31:52 +010029to build the HTML output files. To view the generated HTML, point your favorite
30browser at the top-level index `build/html/index.html` after running "make".
Georg Brandl116aa622007-08-15 14:28:22 +000031
Georg Brandl18a364f2014-03-10 19:26:57 +010032On Windows, we try to emulate the Makefile as closely as possible with a
33``make.bat`` file.
Georg Brandl116aa622007-08-15 14:28:22 +000034
Georg Brandl716c3ac2007-08-30 18:34:23 +000035To use a Python interpreter that's not called ``python``, use the standard
36way to set Makefile variables, using e.g. ::
37
38 make html PYTHON=/usr/bin/python2.5
39
Georg Brandl116aa622007-08-15 14:28:22 +000040Available make targets are:
41
42 * "html", which builds standalone HTML files for offline viewing.
43
Georg Brandl116aa622007-08-15 14:28:22 +000044 * "htmlhelp", which builds HTML files and a HTML Help project file usable to
45 convert them into a single Compiled HTML (.chm) file -- these are popular
46 under Microsoft Windows, but very handy on every platform.
47
Benjamin Petersond7c3ed52010-06-27 22:32:30 +000048 To create the CHM file, you need to run the Microsoft HTML Help Workshop over
49 the generated project (.hhp) file.
Georg Brandl116aa622007-08-15 14:28:22 +000050
Benjamin Petersond7c3ed52010-06-27 22:32:30 +000051 * "latex", which builds LaTeX source files as input to "pdflatex" to produce
52 PDF documents.
Christian Heimes3feef612008-02-11 06:19:17 +000053
Georg Brandl0c77a822008-06-10 16:37:50 +000054 * "text", which builds a plain text file for each source file.
55
Georg Brandl183fe812011-01-05 11:00:25 +000056 * "epub", which builds an EPUB document, suitable to be viewed on e-book
57 readers.
58
Christian Heimes292d3512008-02-03 16:51:08 +000059 * "linkcheck", which checks all external references to see whether they are
Benjamin Petersond7c3ed52010-06-27 22:32:30 +000060 broken, redirected or malformed, and outputs this information to stdout as
61 well as a plain-text (.txt) file.
Christian Heimesd8654cf2007-12-02 15:22:16 +000062
Christian Heimes5b5e81c2007-12-31 16:14:33 +000063 * "changes", which builds an overview over all versionadded/versionchanged/
64 deprecated items in the current version. This is meant as a help for the
65 writer of the "What's New" document.
66
Benjamin Petersond7c3ed52010-06-27 22:32:30 +000067 * "coverage", which builds a coverage overview for standard library modules and
68 C API.
Christian Heimesd3eb5a152008-02-24 00:38:49 +000069
Benjamin Petersond7c3ed52010-06-27 22:32:30 +000070 * "pydoc-topics", which builds a Python module containing a dictionary with
71 plain text documentation for the labels defined in
72 `tools/sphinxext/pyspecific.py` -- pydoc needs these to show topic and
73 keyword help.
Georg Brandl6b38daa2008-06-01 21:05:17 +000074
Georg Brandl18a364f2014-03-10 19:26:57 +010075 * "suspicious", which checks the parsed markup for text that looks like
76 malformed and thus unconverted reST.
Georg Brandl116aa622007-08-15 14:28:22 +000077
78
79Without make
80------------
81
Georg Brandl18a364f2014-03-10 19:26:57 +010082Install the Sphinx package and its dependencies from PyPI.
Georg Brandl116aa622007-08-15 14:28:22 +000083
Georg Brandl18a364f2014-03-10 19:26:57 +010084Then, from the ``Docs`` directory, run ::
Georg Brandld94b4a72010-03-13 10:56:09 +000085
Georg Brandl18a364f2014-03-10 19:26:57 +010086 sphinx-build -b<builder> . build/<builder>
Georg Brandl116aa622007-08-15 14:28:22 +000087
Georg Brandl18a364f2014-03-10 19:26:57 +010088where ``<builder>`` is one of html, text, latex, or htmlhelp (for explanations
89see the make targets above).
Georg Brandl116aa622007-08-15 14:28:22 +000090
91
92Contributing
93============
94
Benjamin Peterson92035012008-12-27 16:00:54 +000095Bugs in the content should be reported to the Python bug tracker at
96http://bugs.python.org.
Georg Brandl116aa622007-08-15 14:28:22 +000097
Benjamin Peterson92035012008-12-27 16:00:54 +000098Bugs in the toolset should be reported in the Sphinx bug tracker at
99http://www.bitbucket.org/birkenfeld/sphinx/issues/.
Georg Brandl116aa622007-08-15 14:28:22 +0000100
101You can also send a mail to the Python Documentation Team at docs@python.org,
102and we will process your request as soon as possible.
103
104If you want to help the Documentation Team, you are always welcome. Just send
105a mail to docs@python.org.
106
107
108Copyright notice
109================
110
111The Python source is copyrighted, but you can freely use and copy it
112as long as you don't change or remove the copyright notice:
113
114----------------------------------------------------------------------
Benjamin Petersonfa10ae02013-12-31 22:02:22 -0600115Copyright (c) 2000-2014 Python Software Foundation.
Georg Brandl116aa622007-08-15 14:28:22 +0000116All rights reserved.
117
118Copyright (c) 2000 BeOpen.com.
119All rights reserved.
120
121Copyright (c) 1995-2000 Corporation for National Research Initiatives.
122All rights reserved.
123
124Copyright (c) 1991-1995 Stichting Mathematisch Centrum.
125All rights reserved.
126
127See the file "license.rst" for information on usage and redistribution
128of this file, and for a DISCLAIMER OF ALL WARRANTIES.
129----------------------------------------------------------------------