pymotwcn 。
安装
1. 安装python
- python2.5或者python2.6都可以。
- 如果是windows平台,推荐下载 ActivePython
- 其他平台可以直接下载 python官方版本
2. 要确认已经安装了setuptools
- 如果已经安装,你在python安装路径下的Scripts文件夹下会找到一个easy_install.exe。
- setuptools下载
3. 在命令行输入easy_install sphinx
- easy_install可以自动下载并安装sphinx以及它所依赖的其他模块。
建立sphinx工程
建议使用sphinx自带的配置工具sphinx-quickstart。 - 建立一个工程目录,比如D\:Note。 - 在该目录启动命令行,输入sphinx-quickstart
D:\Note>sphinx-quickstart
-
程序会提示输入一些选项,如输入根目录
Welcome to the Sphinx quickstart utility.
Please enter values for the following settings (just press Enter to
accept a default value, if one is given in brackets).
Enter the root path for documentation.
> Root path for the documentation [.]:大部分使用默认选项,直接按回车即可。
- 需要指定的选项
-
-
分离source和build目录,方便管理
> Separate source and build directories (y/N) [n]: y -
指定工程名、作者名、版本号
The project name will occur in several places in the built documentation.
> Project name: Note
> Author name(s): LK
Sphinx has the notion of a "version" and a "release" for the
software. Each version can have multiple releases. For example, for
Python the version is something like 2.5 or 3.0, while the release is
something like 2.5.1 or 3.0a1. If you don't need this dual structure,
just set both to the same value.
> Project version: 0.1
> Project release [0.1]:
-