0

I just built Sphinx for the first time and generated all of the skeleton files. Next I want to add another path with Python files for autodoc to analyze. sphinx.ext.autodoc is in conf.py as an extension.

My Sphinx install is in: /home/mbcn/Software_Projects/Sphinx.
The other path I want to include is /home/mbcn/Software_Projects/Python_Projects/Svnx

I edited conf.py and uncommented these lines:

import os
import sys
sys.path.insert(0, os.path.abspath('.'))

Then I ran make html again. Nothing changed; no new files were analyzed. So I tried:

sys.path.insert(0, os.path.abspath('/home/mbcn/Software_Projects/Python_Projects/Svnx/'))

Still nothing changed. So I tried:

sys.path.insert(0, os.path.abspath('os.path.realpath('/home/mbcn/Software_Projects/Python_Projects/Svnx/’)'))

What am I doing wrong?

Thanks very much for any help.

mzjn
  • 48,958
  • 13
  • 128
  • 248
RTC222
  • 2,025
  • 1
  • 20
  • 53
  • 1
    Your value for `abspath` should be your package's relative path from `conf.py`. It's not clear from the information provided where your `conf.py` for this project is on your system. See example at https://www.sphinx-doc.org/en/master/usage/configuration.html#example-of-configuration-file – Steve Piercy May 02 '23 at 04:56
  • 1
    Looks similar to many other questions, for example https://stackoverflow.com/q/57763542/407651 and https://stackoverflow.com/q/50230797/407651. – mzjn May 02 '23 at 09:10

0 Answers0