Browse Source

Merge "Stop building man pages by default"

tags/3.0.0^0
Jenkins 2 years ago
parent
commit
ca6e92c723
3 changed files with 8 additions and 7 deletions
  1. 6
    0
      doc/source/index.rst
  2. 1
    5
      pbr/builddoc.py
  3. 1
    2
      pbr/tests/test_setup.py

+ 6
- 0
doc/source/index.rst View File

@@ -380,6 +380,12 @@ documentation`__. In addition, the ``autodoc_index_modules``,
380 380
 ``autodoc_tree_excludes`` options in the ``pbr`` section will affect the output
381 381
 of 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 389
 __ http://www.sphinx-doc.org/en/stable/man/sphinx-apidoc.html
384 390
 __ http://www.sphinx-doc.org/en/stable/setuptools.html
385 391
 

+ 1
- 5
pbr/builddoc.py View File

@@ -63,7 +63,7 @@ def _find_modules(arg, dirname, files):
63 63
 
64 64
 class LocalBuildDoc(setup_command.BuildDoc):
65 65
 
66
-    builders = ['html', 'man']
66
+    builders = ['html']
67 67
     command_name = 'build_sphinx'
68 68
     sphinx_initialized = False
69 69
 
@@ -142,10 +142,6 @@ class LocalBuildDoc(setup_command.BuildDoc):
142 142
             self.builder_target_dir, self.doctree_dir,
143 143
             self.builder, confoverrides, status_stream,
144 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 145
         self.sphinx_initialized = True
150 146
 
151 147
         try:

+ 1
- 2
pbr/tests/test_setup.py View File

@@ -308,9 +308,8 @@ class BuildSphinxTest(BaseSphinxTest):
308 308
         build_doc = packaging.LocalBuildDoc(self.distr)
309 309
         build_doc.finalize_options()
310 310
 
311
-        self.assertEqual(2, len(build_doc.builders))
311
+        self.assertEqual(1, len(build_doc.builders))
312 312
         self.assertIn('html', build_doc.builders)
313
-        self.assertIn('man', build_doc.builders)
314 313
 
315 314
         build_doc = packaging.LocalBuildDoc(self.distr)
316 315
         build_doc.builders = ''

Loading…
Cancel
Save