当我make html
我得到this little project的Sphinx文档时:
$ make html
sphinx-build -b html -d _build/doctrees . _build/html
Running Sphinx v1.1.3
loading pickled environment... done
building [html]: targets for 1 source files that are out of date
updating environment: 0 added, 1 changed, 0 removed
reading sources... [100%] index
/home/moose/Downloads/lumix_map_tool/doc/index.rst:16: WARNING: don't know which module to import for autodocumenting u'maptool' (try placing a "module" or "currentmodule" directive in the document, or giving an explicit module name)
looking for now-outdated files... none found
pickling environment... done
checking consistency... done
preparing documents... done
writing output... [100%] index
writing additional files... genindex search
copying static files... done
dumping search index... done
dumping object inventory... done
build succeeded, 1 warning.
我的指甲结构是
.
├── doc (automaticall generated by sphinx-quickstart)
├── LICENSE
├── maptool.log
├── maptool.py
└── README.md
我已将sys.path.insert(0, os.path.abspath('/home/moose/Downloads/lumix_map_tool/'))
添加到doc/conf.py
。
为什么Sphinx找不到maptool.py
?
答案 0 :(得分:2)
你有一个名为maptool
的模块,但是在GitHub项目的index.rst中它说:
.. autoclass:: maptool
:members:
:undoc-members:
如果您将autoclass
更改为automodule
,则应该有效。