sphinx-apidoc and package names

15 views
Skip to first unread message

François GUÉRIN

unread,
May 23, 2019, 4:20:56 AM5/23/19
to sphinx-users
Hi,

I've some questions about package names and the sphinx-apidoc utility.

I've a django project strictured like this:


project/
  src
/
    manage
.py
    utils
/
      __init__
.py
      models
.py
     
...
    directory
/
      __init__.py
      models
.py
     
...
    accoun
t/
      __init__.py
      models
.py
     
...
  docs
/
    source/
      conf.py
      index.rst
    build/
      html/

I'ld like to to generate my docs rst files with sphinx-apidoc
$ cd docs
$ sphinx-apidoc --force --separate -o ./source ./src

If I do that, ALL .rst generated files are prefixed with "src.", which is not what I wish...

Then I try another method:

for app in "account utils directory"; do
  cd  docs
  sphinx-apidoc --force --separate -o ./source ${app}
done

This work with all packages, but the utils packages is not prefixed at all : rst files are named :

models.rst (nit utils.models.rst)

Have you any ideas ?
Thanks for your help !


Reply all
Reply to author
Forward
Message has been deleted
0 new messages