From 2574b6c0b721a64d5a4c3d3bbdee70e42bd06b39 Mon Sep 17 00:00:00 2001 From: Doug Hellmann Date: Fri, 7 Jul 2017 14:51:10 -0400 Subject: [PATCH] add sphinx instructions to build API reference docs Change-Id: I216d6e8ef7afa7c1de47f28a6e33ca0a10975912 Signed-off-by: Doug Hellmann --- .gitignore | 1 + doc/source/reference/index.rst | 10 +++------- oslo_privsep/priv_context.py | 4 ++-- setup.cfg | 7 +++++++ 4 files changed, 13 insertions(+), 9 deletions(-) diff --git a/.gitignore b/.gitignore index 1489705..f79eca1 100644 --- a/.gitignore +++ b/.gitignore @@ -53,3 +53,4 @@ ChangeLog # reno build releasenotes/build +/doc/source/reference/api/ diff --git a/doc/source/reference/index.rst b/doc/source/reference/index.rst index 971225e..7247d67 100644 --- a/doc/source/reference/index.rst +++ b/doc/source/reference/index.rst @@ -2,11 +2,7 @@ API ===== -.. Use autodoc directives to describe the *public* modules and classes - in the library. +.. toctree:: + :maxdepth: 2 - If the modules are completely unrelated, create an api subdirectory - and use a separate file for each (see oslo.utils). - - If there is only one submodule, a single api.rst file like this - sufficient (see oslo.i18n). + api/autoindex diff --git a/oslo_privsep/priv_context.py b/oslo_privsep/priv_context.py index e3f1b2a..98b5df3 100644 --- a/oslo_privsep/priv_context.py +++ b/oslo_privsep/priv_context.py @@ -77,8 +77,8 @@ def init(root_helper=None): user id, forking, or anything else "odd". :param root_helper: List of command and arguments to prefix - privsep-helper with, in order to run helper as root. Note, - ignored if context's helper_command config option is set. + privsep-helper with, in order to run helper as root. Note, + ignored if context's helper_command config option is set. """ if root_helper: diff --git a/setup.cfg b/setup.cfg index d2f3d8e..4569856 100644 --- a/setup.cfg +++ b/setup.cfg @@ -22,6 +22,13 @@ classifier = packages = oslo_privsep +[pbr] +autodoc_index_modules = True +api_doc_dir = reference/api +autodoc_exclude_modules = + oslo_privsep.tests.* + oslo_privsep._* + [build_sphinx] source-dir = doc/source build-dir = doc/build