From 1fe0ceab39d47300d99b69b2ad3bbf87a4c61c08 Mon Sep 17 00:00:00 2001 From: Stephen Finucane Date: Mon, 12 Mar 2018 17:34:58 +0000 Subject: builddoc: Treat '[pbr] autodoc_tree_excludes' as a multi-line opt We were treating this a single line, comma- or space-delimited option. This was incorrect and was causing issues for projects like neutron-lib when Sphinx 1.7, which switches from optparse to the stricter argparse was used. In addition, this project was including comments in the multi-line opt. These were being passed through but Sphinx < 1.7 was simply ignoring them. These are now filtered out. Change-Id: I177edf0f44714175da220cf3a960b8f23aa4ab09 Closes-Bug: #1753082 --- pbr/builddoc.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'pbr/builddoc.py') diff --git a/pbr/builddoc.py b/pbr/builddoc.py index 9f61920..167d13e 100644 --- a/pbr/builddoc.py +++ b/pbr/builddoc.py @@ -242,6 +242,8 @@ class LocalBuildDoc(setup_command.BuildDoc): self.autodoc_tree_excludes = ['setup.py'] def finalize_options(self): + from pbr import util + # Not a new style class, super keyword does not work. setup_command.BuildDoc.finalize_options(self) @@ -262,8 +264,8 @@ class LocalBuildDoc(setup_command.BuildDoc): opt = 'autodoc_tree_excludes' option_dict = self.distribution.get_option_dict('pbr') if opt in option_dict: - self.autodoc_tree_excludes = option_dict[opt][1] - self.ensure_string_list(opt) + self.autodoc_tree_excludes = util.split_multiline( + option_dict[opt][1]) # handle Sphinx < 1.5.0 if not hasattr(self, 'warning_is_error'): -- cgit v1.2.1