summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Bechtold <tbechtold@suse.com>2017-03-09 11:29:48 +0100
committerThomas Bechtold <tbechtold@suse.com>2017-03-09 11:29:48 +0100
commitebd9ae850a18b26f37738a67b7e528896b249e40 (patch)
treed51ab9fbbdf2926c66431d0ce7cf488e2d610f5f
parent6448d036f7ae7e336708f00b8d55d8cfb6c8c942 (diff)
downloadpbr-ebd9ae850a18b26f37738a67b7e528896b249e40.tar.gz
Make oslosphinx optional
Avoid cyclic dependencies between pbr and oslosphinx. So if oslosphinx is not available, continue to be able to generate the documentation. Change-Id: I4c1f8ea5cded268388dab29931055223f8999c8a
-rw-r--r--doc/source/conf.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/doc/source/conf.py b/doc/source/conf.py
index 31003c1..f0a78ec 100644
--- a/doc/source/conf.py
+++ b/doc/source/conf.py
@@ -8,8 +8,14 @@ sys.path.insert(0, os.path.abspath('../..'))
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
-extensions = ['sphinx.ext.autodoc',
- 'oslosphinx']
+extensions = ['sphinx.ext.autodoc']
+# make oslosphinx optional to not increase the needed dependencies
+try:
+ import oslosphinx
+except ImportError:
+ pass
+else:
+ extensions.append('oslosphinx')
# autodoc generation is a bit aggressive and a nuisance when doing heavy
# text edit cycles.