我对Sphinx来说是全新的,并且看过几个小时的教程,但找不到我的问题的答案
我有一个像下面这样的当前项目结构
-project folder
|-sub folder 1
| |- sub folder 1.a
| | - ...
|-sub folder 2
| |- sub folder 2.a
| | - ...
|-sub folder 3
| |- sub folder 3.a
| | - ...
|- .py files
|...
|- conf.py
|- index.rst
|- Makefile
|- _build/
| |-doctrees/
| |-html/
| |...(all the html files generated by "make html")
我在conf.py中包含了以下内容
extensions = ['autoapi.extension']
# Document Python Code
autoapi_type = 'python'
autoapi_dir = '../project folder'
在每个子文件夹中,我有.py文件,其中包含所有需要记录的类,函数,模块和成员。有没有一种方法,sphinx将通过当前项目文件夹及其所有子目录解析.py文件到autodoc?如果是这样,我将如何设置index.rst和conf.py文件以实现此目的?
我看到的错误如下:
Removing everything under '_build'...
Running Sphinx v1.8.5
making output directory...
Extension error:
You must configure an autoapi_dirs setting
Makefile:19: recipe for target 'html' failed
make: *** [html] Error 2