I'm using Sphinx
version 1.4.5
.
My project structure is the following:
+ src > main.py
+ docs (generated with sphinx-quickstart)
Even after adding the path to the src
folder in docs/conf.py
:
sys.path.insert(0, os.path.abspath('../src'))
And generating the rst file for src/main.py
(i.e. docs/src.rst
and docs/modules.rst
) with:
$ sphinx-apidoc -fo docs src
When I try to build the html
webpages with:
$ make clean
$ make html
It couldn't find both the src
module and src/main.py
:
WARNING: autodoc: failed to import module u'src.main'; the following exception was raised