PBR

pbr does not support sphinx-apidoc option --implicit-namespaces

Bug #1701893 reported by fullname
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
PBR
Won't Fix
Undecided
Unassigned

Bug Description

PEP420 namespace packages are supported by sphinx-apidoc via the --implicit-namespaces option, but pbr does not support this option, so that "python setup.py build_sphinx" on a project with Python 3 namespace packages does not work (the generated modules.rst does not refer to the package). The following change in pbr/builddoc.py/_sphinx_tree() will call sphinx-apidoc with the option --implicit-namespaces:

            cmd = ['apidoc', '.', '-H', 'Modules', '--implicit-namespaces', '-o', source_dir]

Revision history for this message
fullname (username51423) wrote :

This bug report can be ignored, because the current implementation provides a much more flexible way to pass options to sphinx-apidoc: They can be prepended in setup.cfg / [pbr] / autodoc_tree_excludes. So I was able to fine-tune sphinx-apidoc behaviour by using the following in setup.cfg:

[files]
namespace_packages =
    my_namespace_package

[pbr]
autodoc_tree_index_modules = True
autodoc_tree_excludes = --implicit-namespaces -M -e docs tests setup.py

Ben Nemec (bnemec)
Changed in pbr:
status: New → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.