From 01f63b875e6534a90ded876c88115f8e5eb0c7f6 Mon Sep 17 00:00:00 2001 From: Stephen Finucane Date: Thu, 10 Sep 2020 15:58:12 +0100 Subject: sphinxext: Add 'merge_domaindata' This is necessary to enable parallel builds. As noted in the Sphinx docs [1], this method has the following function: Merge in data regarding docnames from a different domaindata inventory (coming from a subprocess in parallel builds). Given how simple the datatypes we're storing are, this is pretty easy to implement. [1] https://www.sphinx-doc.org/en/master/extdev/domainapi.html#sphinx.domains.Domain.merge_domaindata Change-Id: I46c7903b159f99c68896a4c3c4d20daef848f9c2 Signed-off-by: Stephen Finucane Closes-Bug: #1895162 --- oslo_config/sphinxext.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/oslo_config/sphinxext.py b/oslo_config/sphinxext.py index 4a11163..6aadf73 100644 --- a/oslo_config/sphinxext.py +++ b/oslo_config/sphinxext.py @@ -495,6 +495,15 @@ class ConfigDomain(Domain): ) return None + def merge_domaindata(self, docnames, otherdata): + for target, docname in otherdata['options'].items(): + if docname in docnames: + self.data['options'][target] = docname + + for target, docname in otherdata['groups'].items(): + if docname in docnames: + self.data['groups'][target] = docname + def setup(app): # NOTE(dhellmann): Try to turn off lazy translation from oslo_i18n -- cgit v1.2.1