So I have a Python application I'm trying to document with Sphinx. I've created the directory structure, run sphinx-quickstart
, and sphinx-apidoc
, and changed my config.py
for:
sys.path.insert(0, os.path.abspath('../..'))
My main problem is this error:
$ make html
...
WARNING: autodoc: failed to import module '<module-name>' from module 'app'; the following exception was raised:
No module named 'cfenv'
cfenv
is a package in our pypi repository, and I have a requirements.txt
file in both the root of the application and in the docs/
directory that has these lines:
--index-url=<url for the repository>
--extra-index-url=<url for the repository>
The app builds and runs with no issues (i.e., it pulls the imported code from the pypi repo), but the document build fails. All the solutions I've seen have always involved putting the absolute path of the imported code into the config.py
, but I have a URL, not a pathname.
Any help here would be appreciated. Thanks!