blob: 7fac730e55af87b3bcb2ec98e73aedcdeecdcb77 [file] [log] [blame]
Georg Brandl8ec7f652007-08-15 14:28:01 +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
6available at http://docs.python.org/download/.
7
8Documentation on the authoring Python documentation, including information about
9both style and markup, is available in the "Documenting Python" chapter of the
Georg Brandl418b1ea2014-03-10 19:26:57 +010010documentation.
Georg Brandl8ec7f652007-08-15 14:28:01 +000011
12
13Building the docs
14=================
15
Georg Brandl418b1ea2014-03-10 19:26:57 +010016You need to have Python 2 installed; the toolset used to build the
Georg Brandlf084aed2010-06-12 09:46:03 +000017docs is written in Python. It is called *Sphinx*, it is not included in this
18tree, but maintained separately. Also needed are the docutils, supplying the
19base markup that Sphinx uses, Jinja, a templating engine, and optionally
20Pygments, a code highlighter.
Georg Brandl8ec7f652007-08-15 14:28:01 +000021
22
23Using make
24----------
25
26Luckily, a Makefile has been prepared so that on Unix, provided you have
27installed Python and Subversion, you can just run ::
28
29 make html
30
31to check out the necessary toolset in the `tools/` subdirectory and build the
32HTML output files. To view the generated HTML, point your favorite browser at
33the top-level index `build/html/index.html` after running "make".
34
Georg Brandl418b1ea2014-03-10 19:26:57 +010035On Windows, we try to emulate the Makefile as closely as possible with a
36``make.bat`` file.
37
Georg Brandl8ec7f652007-08-15 14:28:01 +000038Available make targets are:
39
40 * "html", which builds standalone HTML files for offline viewing.
41
Georg Brandl8ec7f652007-08-15 14:28:01 +000042 * "htmlhelp", which builds HTML files and a HTML Help project file usable to
43 convert them into a single Compiled HTML (.chm) file -- these are popular
44 under Microsoft Windows, but very handy on every platform.
45
Georg Brandlf084aed2010-06-12 09:46:03 +000046 To create the CHM file, you need to run the Microsoft HTML Help Workshop over
47 the generated project (.hhp) file.
Georg Brandl8ec7f652007-08-15 14:28:01 +000048
Georg Brandlf084aed2010-06-12 09:46:03 +000049 * "latex", which builds LaTeX source files as input to "pdflatex" to produce
50 PDF documents.
Georg Brandl14a1b8c2008-02-09 23:09:25 +000051
Georg Brandl4f2c9982008-06-01 16:41:31 +000052 * "text", which builds a plain text file for each source file.
53
Georg Brandlcd235272008-02-01 15:50:15 +000054 * "linkcheck", which checks all external references to see whether they are
Georg Brandlf084aed2010-06-12 09:46:03 +000055 broken, redirected or malformed, and outputs this information to stdout as
56 well as a plain-text (.txt) file.
Georg Brandl584265b2007-12-02 14:58:50 +000057
Georg Brandlb19be572007-12-29 10:57:00 +000058 * "changes", which builds an overview over all versionadded/versionchanged/
59 deprecated items in the current version. This is meant as a help for the
60 writer of the "What's New" document.
61
Georg Brandlf084aed2010-06-12 09:46:03 +000062 * "coverage", which builds a coverage overview for standard library modules and
63 C API.
Georg Brandl17048282008-02-23 18:47:04 +000064
Georg Brandlf084aed2010-06-12 09:46:03 +000065 * "pydoc-topics", which builds a Python module containing a dictionary with
66 plain text documentation for the labels defined in
67 `tools/sphinxext/pyspecific.py` -- pydoc needs these to show topic and
68 keyword help.
Georg Brandl681001e2008-06-01 20:33:55 +000069
Georg Brandl418b1ea2014-03-10 19:26:57 +010070 * "suspicious", which checks the parsed markup for text that looks like
71 malformed and thus unconverted reST.
72
Georg Brandl8ec7f652007-08-15 14:28:01 +000073A "make update" updates the Subversion checkouts in `tools/`.
74
75
76Without make
77------------
78
Georg Brandl418b1ea2014-03-10 19:26:57 +010079Install the Sphinx package and its dependencies from PyPI.
Georg Brandl8ec7f652007-08-15 14:28:01 +000080
Georg Brandl418b1ea2014-03-10 19:26:57 +010081Then, from the ``Docs`` directory, run ::
Georg Brandlfce7b862010-03-13 10:54:12 +000082
Georg Brandl418b1ea2014-03-10 19:26:57 +010083 sphinx-build -b<builder> . build/<builder>
Georg Brandl8ec7f652007-08-15 14:28:01 +000084
Georg Brandl418b1ea2014-03-10 19:26:57 +010085where ``<builder>`` is one of html, text, latex, or htmlhelp (for explanations
86see the make targets above).
Georg Brandl8ec7f652007-08-15 14:28:01 +000087
88
89Contributing
90============
91
Benjamin Peterson2c85ed52008-12-21 01:12:26 +000092Bugs in the content should be reported to the Python bug tracker at
93http://bugs.python.org.
Georg Brandl8ec7f652007-08-15 14:28:01 +000094
Benjamin Peterson2c85ed52008-12-21 01:12:26 +000095Bugs in the toolset should be reported in the Sphinx bug tracker at
96http://www.bitbucket.org/birkenfeld/sphinx/issues/.
Georg Brandl8ec7f652007-08-15 14:28:01 +000097
98You can also send a mail to the Python Documentation Team at docs@python.org,
99and we will process your request as soon as possible.
100
101If you want to help the Documentation Team, you are always welcome. Just send
102a mail to docs@python.org.
103
104
105Copyright notice
106================
107
108The Python source is copyrighted, but you can freely use and copy it
109as long as you don't change or remove the copyright notice:
110
111----------------------------------------------------------------------
Benjamin Peterson1aeb8cf2013-12-31 22:02:22 -0600112Copyright (c) 2000-2014 Python Software Foundation.
Georg Brandl8ec7f652007-08-15 14:28:01 +0000113All rights reserved.
114
115Copyright (c) 2000 BeOpen.com.
116All rights reserved.
117
118Copyright (c) 1995-2000 Corporation for National Research Initiatives.
119All rights reserved.
120
121Copyright (c) 1991-1995 Stichting Mathematisch Centrum.
122All rights reserved.
123
124See the file "license.rst" for information on usage and redistribution
125of this file, and for a DISCLAIMER OF ALL WARRANTIES.
126----------------------------------------------------------------------