diff options
author | Stephen Finucane <sfinucan@redhat.com> | 2018-03-12 17:34:58 +0000 |
---|---|---|
committer | Stephen Finucane <stephenfin@redhat.com> | 2018-03-26 12:40:20 +0000 |
commit | 1fe0ceab39d47300d99b69b2ad3bbf87a4c61c08 (patch) | |
tree | bf0ef751b4bc39fc375c6ffd844d1813b5ea2247 /pbr/builddoc.py | |
parent | 37a1ce7f8529857a718022b250463251b7539dc7 (diff) | |
download | pbr-1fe0ceab39d47300d99b69b2ad3bbf87a4c61c08.tar.gz |
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
Diffstat (limited to 'pbr/builddoc.py')
-rw-r--r-- | pbr/builddoc.py | 6 |
1 files changed, 4 insertions, 2 deletions
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'): |