2014-07-23 4 views
1

(autodocnumpydoc과 함께)을 사용하여 모듈을 문서화하려고하지만 기본 설정 후에 make html을 실행하면 포함 된 문서 문자열이없는 기본 html 만 생성됩니다. 내가 파이썬 3.3을 실행하는거야, 프로젝트 구조의 개요는 다음과 같다 :스핑크스 autodoc에서 가져 오기가 없습니다.

Kineticlib 
|--docs 
| |--build 
| |--source 
| | |--conf.py 
|--src 
| |--kineticmulti 
| | |--__init__.py 
| | |--file1.py 
| | |--file2.py 
|--setup.py 

__init__.py 내가 docs 디렉토리에 make html 실행 sys.path.insert(0, os.path.abspath('../..'))

을 추가 한 docs/source 디렉토리에 비어 있으며 conf.py에 다음 출력을 제공합니다 :

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. 

그래서 내가 뭘 잘못하고 있니?

답변

2

docs/source 디렉토리에서 sphinx-apidoc을 실행 했습니까? 이렇게하면 html을 만드는 데 사용되는 .rst 파일이 생성됩니다.

sphinx-apidoc [options] -o <outputdir> <sourcedir> [pathnames ...] 

, man sphinx-apidoc에서 당신은 outputdir합니다 (한 .rst 파일이 갈 곳, ./ 작동합니다)와 패키지를 표시해야한다 (처럼 보이는 sourcedir (최소한)를 포함해야합니다. ./../src/kineticmulti는 작동해야 함)

+0

예, 잊어 버렸습니다. –

관련 문제