Reputation: 3719
I have a python project and a structure like this
project
|-- doc
|-- src
|-- mod_1.py
| |-- Class1
|-- package1
|-- mod_2.py
|-- Class2
I used sphinx-apidoc
to create my documentation and the path to my submodules look like this
src.mod1
src.package2.mod2
Now I wonder, if there is a way to remove the src
prefix?
To make the path look like this
mod1
package2.mod2
Upvotes: 1
Views: 680
Reputation: 3719
After raising an issue at GitHub sphinx #3113, shimizukawa came up with a solution:
__init__.py
from src
folder/../src
instead of /../
in the conf.py
Upvotes: 4