diff options
author | Julien Danjou <julien@danjou.info> | 2017-05-17 12:05:59 +0200 |
---|---|---|
committer | Julien Danjou <julien@danjou.info> | 2017-05-17 12:11:18 +0200 |
commit | c02406601a7d7c453c77318ff5b5af6d760e80ae (patch) | |
tree | a5af33f9e66caf7fc0eccd80b2471c966baa032c | |
parent | 12a1c1dc3ca2df77f5626e75b9a8889fc98d4366 (diff) | |
download | pbr-c02406601a7d7c453c77318ff5b5af6d760e80ae.tar.gz |
builddoc: uses the new Sphinx 1.6 code for multiple builder3.0.1
As noted by stephenfin, Sphinx 1.6 provides its own code to build doc with
multiple builders. The one provided by pbr so far for Sphinx < 1.6 is not even
compatible with 1.6. This patch fixes that by running the native Sphinx code
for Sphinx > 1.6 and falling back to the old code for older Sphinx versions.
Closes-Bug: #1691129
Change-Id: I5224235b1056a248b246c54e2d99eea94d53c4eb
-rw-r--r-- | pbr/builddoc.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/pbr/builddoc.py b/pbr/builddoc.py index 45e782a..1d31502 100644 --- a/pbr/builddoc.py +++ b/pbr/builddoc.py @@ -186,6 +186,11 @@ class LocalBuildDoc(setup_command.BuildDoc): # TODO(stephenfin): Deprecate this functionality once we depend on # Sphinx 1.6, which includes a similar feature, in g-r # https://github.com/sphinx-doc/sphinx/pull/3476 + self.finalize_options() + if hasattr(self, "builder_target_dirs"): + # Sphinx >= 1.6.1 + return setup_command.BuildDoc.run(self) + # Sphinx < 1.6 for builder in self.builders: self.builder = builder self.finalize_options() |