summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2017-04-15 15:00:46 +0000
committerGerrit Code Review <review@openstack.org>2017-04-15 15:00:46 +0000
commitca6e92c723c927d730db251c428b402d1c0701cb (patch)
tree27a036a764b0bb1dbc15cab6377664e92bc6d9ed
parent1ed853109574e4ae6f8dae932f292b751749f747 (diff)
parentd4e4efd77963ef95906cfbac73468f80cd8e3330 (diff)
Merge "Stop building man pages by default"3.0.0
-rw-r--r--doc/source/index.rst6
-rw-r--r--pbr/builddoc.py6
-rw-r--r--pbr/tests/test_setup.py3
3 files changed, 8 insertions, 7 deletions
diff --git a/doc/source/index.rst b/doc/source/index.rst
index 4a4e90a..764edf1 100644
--- a/doc/source/index.rst
+++ b/doc/source/index.rst
@@ -380,6 +380,12 @@ documentation`__. In addition, the ``autodoc_index_modules``,
380``autodoc_tree_excludes`` options in the ``pbr`` section will affect the output 380``autodoc_tree_excludes`` options in the ``pbr`` section will affect the output
381of the automatic module documentation generation. 381of the automatic module documentation generation.
382 382
383.. versionchanged:: 3.0
384
385 The ``build_sphinx`` plugin used to default to building both HTML and man
386 page output. This is no longer the case, and you should explicitly set
387 ``builders`` to ``html man`` if you wish to retain this behavior.
388
383__ http://www.sphinx-doc.org/en/stable/man/sphinx-apidoc.html 389__ http://www.sphinx-doc.org/en/stable/man/sphinx-apidoc.html
384__ http://www.sphinx-doc.org/en/stable/setuptools.html 390__ http://www.sphinx-doc.org/en/stable/setuptools.html
385 391
diff --git a/pbr/builddoc.py b/pbr/builddoc.py
index 1359624..343f7c3 100644
--- a/pbr/builddoc.py
+++ b/pbr/builddoc.py
@@ -63,7 +63,7 @@ def _find_modules(arg, dirname, files):
63 63
64class LocalBuildDoc(setup_command.BuildDoc): 64class LocalBuildDoc(setup_command.BuildDoc):
65 65
66 builders = ['html', 'man'] 66 builders = ['html']
67 command_name = 'build_sphinx' 67 command_name = 'build_sphinx'
68 sphinx_initialized = False 68 sphinx_initialized = False
69 69
@@ -142,10 +142,6 @@ class LocalBuildDoc(setup_command.BuildDoc):
142 self.builder_target_dir, self.doctree_dir, 142 self.builder_target_dir, self.doctree_dir,
143 self.builder, confoverrides, status_stream, 143 self.builder, confoverrides, status_stream,
144 freshenv=self.fresh_env, warningiserror=self.warning_is_error) 144 freshenv=self.fresh_env, warningiserror=self.warning_is_error)
145 sphinx_config = app.config
146 if self.builder == 'man' and len(
147 getattr(sphinx_config, 'man_pages', '')) == 0:
148 return
149 self.sphinx_initialized = True 145 self.sphinx_initialized = True
150 146
151 try: 147 try:
diff --git a/pbr/tests/test_setup.py b/pbr/tests/test_setup.py
index 3d2f401..7aa74f6 100644
--- a/pbr/tests/test_setup.py
+++ b/pbr/tests/test_setup.py
@@ -308,9 +308,8 @@ class BuildSphinxTest(BaseSphinxTest):
308 build_doc = packaging.LocalBuildDoc(self.distr) 308 build_doc = packaging.LocalBuildDoc(self.distr)
309 build_doc.finalize_options() 309 build_doc.finalize_options()
310 310
311 self.assertEqual(2, len(build_doc.builders)) 311 self.assertEqual(1, len(build_doc.builders))
312 self.assertIn('html', build_doc.builders) 312 self.assertIn('html', build_doc.builders)
313 self.assertIn('man', build_doc.builders)
314 313
315 build_doc = packaging.LocalBuildDoc(self.distr) 314 build_doc = packaging.LocalBuildDoc(self.distr)
316 build_doc.builders = '' 315 build_doc.builders = ''