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
This commit is contained in:
Thomas Bechtold 2017-05-29 19:10:59 +02:00
parent 5529882740
commit e3dcbdd582
2 changed files with 18 additions and 1 deletions

View File

@ -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

View File

@ -0,0 +1,5 @@
---
other:
- The oslosphinx dependency for building documentation
is now optional. This breaks a build cycle between
oslosphinx and reno.