Differences between revisions 6 and 8 (spanning 2 versions)
Revision 6 as of 2008-12-16 16:04:13
Size: 2306
Editor: ZoomQuiet
Comment:
Revision 8 as of 2008-12-16 16:15:54
Size: 2642
Editor: ZoomQuiet
Comment:
Deletions are marked like this. Additions are marked like this.
Line 8: Line 8:
##startInc
Line 10: Line 10:


##startInc
Line 35: Line 32:
     * attachment:make_dist.png
Line 41: Line 39:
 文档版本::
  * 081216 ZoomQuiet 增补实感,并追加截屏!
  * 081204 MarchLiu 创建
Line 45: Line 46:
  * 我们得输出男人版本Python:
{{{
svn co http://svn.python.org/projects/python/trunk python-svn
}}}
  * 然后将`Doc/tools/sphinxext` 复制到当前编译文档的 `Python-2.6.1/Doc/tools` 中就好

TableOfContents

Include(ZPyUGnav)

编译Python 2.6 文档

适用范围

理论上讲本方法适用于所有(自Python 2.5起)使用reST格式发布的Python官方文档。不过我没有在Python 2.5环境下试过,目前Python 3.0和在翻译中的Python 2.6的Tutorial都是用这个方法生成的。

本文只适用于 *nix 环境,在Windows上没有经过测试。

编译方法

准备

  • 无论你想编译哪一版的文档,将完整的Python源码从官网上下载下来,找一个目录,解压。
  • 编译Python,是的,你没看错,编译整个Python,在它的目录下就有 configure 和 MakeFile,像普通项目那样配置编译就好,但是不需要安装。

    1. 配置 attachment:configure_py.png
      • 一般说只要基础环境靠谱,或是以编辑方式安装过软件,配置都会很快过去的,,,
    2. $ make attachment:make_py.png

编译

  • 进入 Doc 目录,你会看到另一个 MakeFile。如果你直接make。它会提示你需要指定格式,可选的有html、pdf、latex等等。

  • OK,选你需要的,编译就好了。pdf版实际上是用latex再编译成pdf,我没找到MakeFile中指定的工具,就没有去做它。

    • attachment:make_options.png
    • 一般使用 $ make dist ~ 制作本地发行版~将 HTML页面组织成和 http://docs.python.org 一样的网站!

    • attachment:make_dist.png

自个儿的版本

如果你需要编译一份简体中文版的Tutorial,只要把简体中文版文档的rst文件,覆盖到相应的目录下。回到Doc目录,make html(或其它你想要生成的格式)。就可以啦。

文档版本

反馈

081216 Zoom,Quiet
attachment:makedist-error.png

svn co http://svn.python.org/projects/python/trunk python-svn
  • 然后将Doc/tools/sphinxext 复制到当前编译文档的 Python-2.6.1/Doc/tools 中就好


创建 by -- MarchLiu [DateTime(2008-12-04T14:14:24Z)]

PageComment2

[:/PageCommentData:PageCommentData]

HowToCompliePythonDocument (last edited 2009-12-25 07:14:41 by localhost)