sphinxuser
sphinxuser

Reputation: 1

"python setup.py build_sphinx" and "sphinx-apidoc --implicit-namespaces"

sphinx-apidoc supports the option --implicit-namespaces to handle namespace packages according to PEP420. When I create the Sphinx documentation with "python setup.py build_sphinx", this does not work with namespace packages by default. Is there a relation between "python setup.py build_sphinx" and sphinx-apidoc (e. g. is sphinx-apidoc implicitly called somewhere, when "python setup.py build_sphinx" is run?)? If so, can I specifiy somehow that "python setup.py build_sphinx" shall consider the --implicit-namespaces option of sphinx-apidoc?

Upvotes: 0

Views: 1089

Answers (1)

sphinxuser
sphinxuser

Reputation: 1

Looking at the output of "sphinx-quickstart" showed me the 3 steps to generate documentation:

  1. "sphinx-quickstart" to create an initial directory structure with conf.py and index.rst
  2. "sphinx-apidoc" to generate *.rst files, which can also be adapted further
  3. "make html" or "sphinx-build" or "python setup.py build_sphinx" or "devpi upload --with-docs" to generate HTML from the *.rst files

So "sphinx-apidoc" is not implicitly called by "python setup.py build_sphinx", but both must be called one after the other.

Upvotes: 0

Related Questions