Geo*_*nko 5 python python-sphinx autodoc
我正在尝试使用sphinx(autodoc和和numpydoc)来记录我的模块,但是在完成基本设置后,运行make html只生成基本的html,而所包含的文档字符串都不包含任何内容。我正在运行Python 3.3,项目结构的概述如下:
Kineticlib
|--docs
| |--build
| |--source
| | |--conf.py
|--src
| |--kineticmulti
| | |--__init__.py
| | |--file1.py
| | |--file2.py
|--setup.py
Run Code Online (Sandbox Code Playgroud)
__init__.py是空的,并且在我添加conf.py的docs/source目录中sys.path.insert(0, os.path.abspath('../..'))
make html在docs目录中运行将产生以下输出:
sphinx-build -b html -d build/doctrees source build/html
Running Sphinx v1.2.2
loading pickled environment... done
building [html]: targets for 0 source files that are out of date
updating environment: 0 added, 0 changed, 0 removed
looking for now-outdated files... none found
no targets are out of date.
Build finished. The HTML pages are in build/html.
Run Code Online (Sandbox Code Playgroud)
那么,我在做什么错呢?
您是否在docs / source目录中运行了sphinx-apidoc?这将生成用于制作html的.rst文件。来自man sphinx-apidoc,
sphinx-apidoc [options] -o <outputdir> <sourcedir> [pathnames ...]
Run Code Online (Sandbox Code Playgroud)
您需要(至少)包括(outputdir.rst文件将进入的位置,。/应该可以工作),sourcedir并且应该指向您的包(看起来像../../src/kineticmulti应该可以工作)。
| 归档时间: |
|
| 查看次数: |
1173 次 |
| 最近记录: |