[Python] sphinx-apidoc usage - multiple source python directories

Discussão em 'Python' iniciado por Stack, Janeiro 26, 2025.

  1. Stack

    Stack Membro Participativo

    So I have my python source files in two different directories:-

    e.g.

    ~/work/myproject
    ~/.virtualenvs/myproject


    How do I use sphinx-apidoc to look in both directories recursively to generate my reST files?

    Obviously,

    sphinx-apidoc -o docs/source ~/work/myproject


    works perfectly fine but when I attempt to run

    sphinx-apidoc -o docs/source ~/.virtualenvs/myproject


    again, sphinx tells me that "docs/source/modules.rst already exists, skipping" which of course is true as I have already run sphinx-apidoc once to generate it.

    So how do I execute it once and search in both directories?

    Continue reading...

Compartilhe esta Página