From e3dcbdd582b950504a17147b60e02904f3a5e8c8 Mon Sep 17 00:00:00 2001 From: Thomas Bechtold Date: Mon, 29 May 2017 19:10:59 +0200 Subject: [PATCH] Make oslosphinx requirement optional There is a build cycle between reno and oslosphinx. Now the documentation can be build without oslosphinx installed. Change-Id: Iae6abbe5b2991123f56bf2f4e852c57cd9ca6c11 --- doc/source/conf.py | 14 +++++++++++++- .../optional-oslosphinx-55843a7f80a14e58.yaml | 5 +++++ 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 releasenotes/notes/optional-oslosphinx-55843a7f80a14e58.yaml diff --git a/doc/source/conf.py b/doc/source/conf.py index d881af5..494bd24 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -15,6 +15,16 @@ import os import sys +# oslosphinx uses reno and reno uses oslosphinx. Make oslosphinx for +# reno optional to break the build cycle +try: + import oslosphinx +except: + has_oslosphinx = False +else: + has_oslosphinx = True + + sys.path.insert(0, os.path.abspath('../..')) # -- General configuration ---------------------------------------------------- @@ -23,10 +33,12 @@ sys.path.insert(0, os.path.abspath('../..')) extensions = [ 'sphinx.ext.autodoc', #'sphinx.ext.intersphinx', - 'oslosphinx', 'reno.sphinxext', ] +if has_oslosphinx: + extensions.append('oslosphinx') + # autodoc generation is a bit aggressive and a nuisance when doing heavy # text edit cycles. # execute "export SPHINX_DEBUG=1" in your terminal to disable diff --git a/releasenotes/notes/optional-oslosphinx-55843a7f80a14e58.yaml b/releasenotes/notes/optional-oslosphinx-55843a7f80a14e58.yaml new file mode 100644 index 0000000..ee0252f --- /dev/null +++ b/releasenotes/notes/optional-oslosphinx-55843a7f80a14e58.yaml @@ -0,0 +1,5 @@ +--- +other: + - The oslosphinx dependency for building documentation + is now optional. This breaks a build cycle between + oslosphinx and reno.