Have you tried changing your sys.path to include both? Eg:
sys.path.insert(0, os.path.abspath(".."))
Then for autodoc tried:
.. automodule:: python_modules_A
.. automodule:: python_modules_B
How you include documentation for it may then depend on your module
structure (eg do you have an __init__.py? does it define __all__?)
On Wednesday, February 15, 2017 at 3:05:18 PM UTC-8, nshea wrote:
>
> I am using sphinx autodoc to document python modules in multiple
> directories. I already have the rst files for each python module and can
> use autodoc when declaring a path to one directory with the python modules
> but I am trying to document python modules from two different directories.
> In the conf.py file, I used:
>
>
> sys.path.insert(0, os.path.abspath("../python_modules_A"))
>
>
> but would like to have paths to both python_modules_A and
> python_modules_B, since my modules are in both directories. Given the
> structure of my project team, I would like to avoid having to restructure
> the modules into one directory since they are separated by helper functions
> in python_module_A and classes/objects for the main module python_modules_B
> modules.
>
>
> Below is how my directories are configured:
>
>
> sphinx_doc_setup
>
> conf.py
>
> index.rst
>
> a1.rst
>
> b1.rst
>
> a2.rst
>
> b2.rst
>
> python_modules_A
>
> a1.py
>
> b1.py
>
> python_modules_B
>
> a2.py
>
> b2.py
>
>
> Thanks for any help!
>
--
You received this message because you are subscribed to the Google Groups
"sphinx-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sphinx-users.
For more options, visit https://groups.google.com/d/optout.