blob: 4527930082e580175a35499e287b98e2a3ffe7fc [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
10documentation. There's also a chapter intended to point out differences to
11those familiar with the previous docs written in LaTeX.
12
13
14Building the docs
15=================
16
Georg Brandl8e8e56c2008-02-09 21:36:15 +000017You need to install Python 2.4 or higher; the toolset used to build the docs are
Georg Brandl8ec7f652007-08-15 14:28:01 +000018written in Python. The toolset used to build the documentation is called
19*Sphinx*, it is not included in this tree, but maintained separately in the
20Python Subversion repository. Also needed are Jinja, a templating engine
21(included in Sphinx as a Subversion external), and optionally Pygments, a code
22highlighter.
23
24
25Using make
26----------
27
28Luckily, a Makefile has been prepared so that on Unix, provided you have
29installed Python and Subversion, you can just run ::
30
31 make html
32
33to check out the necessary toolset in the `tools/` subdirectory and build the
34HTML output files. To view the generated HTML, point your favorite browser at
35the top-level index `build/html/index.html` after running "make".
36
37Available make targets are:
38
39 * "html", which builds standalone HTML files for offline viewing.
40
Georg Brandl8ec7f652007-08-15 14:28:01 +000041 * "htmlhelp", which builds HTML files and a HTML Help project file usable to
42 convert them into a single Compiled HTML (.chm) file -- these are popular
43 under Microsoft Windows, but very handy on every platform.
44
45 To create the CHM file, you need to run the Microsoft HTML Help Workshop
46 over the generated project (.hhp) file.
47
Georg Brandl584265b2007-12-02 14:58:50 +000048 * "latex", which builds LaTeX source files that can be run with "pdflatex"
49 to produce PDF documents.
Georg Brandl14a1b8c2008-02-09 23:09:25 +000050
Georg Brandl4f2c9982008-06-01 16:41:31 +000051 * "text", which builds a plain text file for each source file.
52
Georg Brandlcd235272008-02-01 15:50:15 +000053 * "linkcheck", which checks all external references to see whether they are
54 broken, redirected or malformed, and outputs this information to stdout
55 as well as a plain-text (.txt) file.
Georg Brandl584265b2007-12-02 14:58:50 +000056
Georg Brandlb19be572007-12-29 10:57:00 +000057 * "changes", which builds an overview over all versionadded/versionchanged/
58 deprecated items in the current version. This is meant as a help for the
59 writer of the "What's New" document.
60
Georg Brandl17048282008-02-23 18:47:04 +000061 * "coverage", which builds a coverage overview for standard library modules
62 and C API.
63
Georg Brandl681001e2008-06-01 20:33:55 +000064 * "pydoc-topics", which builds a Python module containing a dictionary
65 with plain text documentation for the labels defined in
66 `tools/sphinxext/pyspecific.py` -- pydoc needs these to show topic
67 and keyword help.
68
Georg Brandl8ec7f652007-08-15 14:28:01 +000069A "make update" updates the Subversion checkouts in `tools/`.
70
71
72Without make
73------------
74
75You'll need to checkout the Sphinx package to the `tools/` directory::
76
Georg Brandl2b996b42008-12-23 12:37:21 +000077 svn co http://svn.python.org/projects/doctools/trunk/sphinx tools/sphinx
Georg Brandl8ec7f652007-08-15 14:28:01 +000078
Benjamin Peterson2c85ed52008-12-21 01:12:26 +000079Then, you need to install Docutils, either by checking it out via ::
Georg Brandl8ec7f652007-08-15 14:28:01 +000080
81 svn co http://svn.python.org/projects/external/docutils-0.4/docutils tools/docutils
82
83or by installing it from http://docutils.sf.net/.
84
85You can optionally also install Pygments, either as a checkout via ::
86
Neal Norwitz98f40b12007-10-27 22:32:21 +000087 svn co http://svn.python.org/projects/external/Pygments-0.9/pygments tools/pygments
Georg Brandl8ec7f652007-08-15 14:28:01 +000088
89or from PyPI at http://pypi.python.org/pypi/Pygments.
90
91
92Then, make an output directory, e.g. under `build/`, and run ::
93
94 python tools/sphinx-build.py -b<builder> . build/<outputdirectory>
95
Benjamin Peterson5c29dd42008-12-21 01:04:32 +000096where `<builder>` is one of html, text, latex, or htmlhelp (for explanations see
97the make targets above).
Georg Brandl8ec7f652007-08-15 14:28:01 +000098
99
100Contributing
101============
102
Benjamin Peterson2c85ed52008-12-21 01:12:26 +0000103Bugs in the content should be reported to the Python bug tracker at
104http://bugs.python.org.
Georg Brandl8ec7f652007-08-15 14:28:01 +0000105
Benjamin Peterson2c85ed52008-12-21 01:12:26 +0000106Bugs in the toolset should be reported in the Sphinx bug tracker at
107http://www.bitbucket.org/birkenfeld/sphinx/issues/.
Georg Brandl8ec7f652007-08-15 14:28:01 +0000108
109You can also send a mail to the Python Documentation Team at docs@python.org,
110and we will process your request as soon as possible.
111
112If you want to help the Documentation Team, you are always welcome. Just send
113a mail to docs@python.org.
114
115
116Copyright notice
117================
118
119The Python source is copyrighted, but you can freely use and copy it
120as long as you don't change or remove the copyright notice:
121
122----------------------------------------------------------------------
Barry Warsaw189b6d82008-03-01 03:15:20 +0000123Copyright (c) 2000-2008 Python Software Foundation.
Georg Brandl8ec7f652007-08-15 14:28:01 +0000124All rights reserved.
125
126Copyright (c) 2000 BeOpen.com.
127All rights reserved.
128
129Copyright (c) 1995-2000 Corporation for National Research Initiatives.
130All rights reserved.
131
132Copyright (c) 1991-1995 Stichting Mathematisch Centrum.
133All rights reserved.
134
135See the file "license.rst" for information on usage and redistribution
136of this file, and for a DISCLAIMER OF ALL WARRANTIES.
137----------------------------------------------------------------------