blob: ebeb358bc2e0d15ca4e7590c192b98a223543b74 [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
41 * "web", which builds files usable with the Sphinx.web application (used to
42 serve the docs online at http://docs.python.org/).
43
44 * "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
48 To create the CHM file, you need to run the Microsoft HTML Help Workshop
49 over the generated project (.hhp) file.
50
Georg Brandl584265b2007-12-02 14:58:50 +000051 * "latex", which builds LaTeX source files that can be run with "pdflatex"
52 to produce PDF documents.
Georg Brandlcd235272008-02-01 15:50:15 +000053
54 * "linkcheck", which checks all external references to see whether they are
55 broken, redirected or malformed, and outputs this information to stdout
56 as 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 Brandl8ec7f652007-08-15 14:28:01 +000062A "make update" updates the Subversion checkouts in `tools/`.
63
64
65Without make
66------------
67
68You'll need to checkout the Sphinx package to the `tools/` directory::
69
70 svn co http://svn.python.org/projects/doctools/trunk/sphinx tools/sphinx
71
72Then, you need to install Docutils 0.4 (the SVN snapshot won't work), either
73by checking it out via ::
74
75 svn co http://svn.python.org/projects/external/docutils-0.4/docutils tools/docutils
76
77or by installing it from http://docutils.sf.net/.
78
79You can optionally also install Pygments, either as a checkout via ::
80
Neal Norwitz98f40b12007-10-27 22:32:21 +000081 svn co http://svn.python.org/projects/external/Pygments-0.9/pygments tools/pygments
Georg Brandl8ec7f652007-08-15 14:28:01 +000082
83or from PyPI at http://pypi.python.org/pypi/Pygments.
84
85
86Then, make an output directory, e.g. under `build/`, and run ::
87
88 python tools/sphinx-build.py -b<builder> . build/<outputdirectory>
89
90where `<builder>` is one of html, web or htmlhelp (for explanations see the make
91targets above).
92
93
94Contributing
95============
96
97For bugs in the content, the online version at http://docs.python.org/ has a
98"suggest change" facility that can be used to correct errors in the source text
99and submit them as a patch to the maintainers.
100
101Bugs in the toolset should be reported in the Python bug tracker at
102http://bugs.python.org/.
103
104You can also send a mail to the Python Documentation Team at docs@python.org,
105and we will process your request as soon as possible.
106
107If you want to help the Documentation Team, you are always welcome. Just send
108a mail to docs@python.org.
109
110
111Copyright notice
112================
113
114The Python source is copyrighted, but you can freely use and copy it
115as long as you don't change or remove the copyright notice:
116
117----------------------------------------------------------------------
118Copyright (c) 2000-2007 Python Software Foundation.
119All rights reserved.
120
121Copyright (c) 2000 BeOpen.com.
122All rights reserved.
123
124Copyright (c) 1995-2000 Corporation for National Research Initiatives.
125All rights reserved.
126
127Copyright (c) 1991-1995 Stichting Mathematisch Centrum.
128All rights reserved.
129
130See the file "license.rst" for information on usage and redistribution
131of this file, and for a DISCLAIMER OF ALL WARRANTIES.
132----------------------------------------------------------------------