假设我有一个文件夹结构
A\__init__.py
A\math\__init__.py
A\math\others.py
A\stats\__init__.py
A\stats\andthese.py我的python路径中有A,所以通常我会执行import math.others,但是import A.math.others会失败。
现在在folder A中,我这样做了
sphinx-apidoc -o ./documentation ./ --full --force要生成配置文件,例如
A\documentation\A.rst
A\documentation\A.math.rst
A\documentation\A.math.others.rst然后在A\documentation中,我使用make html。这将失败,因为它不能导入A.math.others (我不想让A的父文件夹成为python路径)。
如果导入路径中没有根目录,如何使sphinx-apidoc生成配置文件?
https://stackoverflow.com/questions/41323302
复制相似问题