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:
parent
5529882740
commit
e3dcbdd582
|
@ -15,6 +15,16 @@
|
||||||
import os
|
import os
|
||||||
import sys
|
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('../..'))
|
sys.path.insert(0, os.path.abspath('../..'))
|
||||||
# -- General configuration ----------------------------------------------------
|
# -- General configuration ----------------------------------------------------
|
||||||
|
|
||||||
|
@ -23,10 +33,12 @@ sys.path.insert(0, os.path.abspath('../..'))
|
||||||
extensions = [
|
extensions = [
|
||||||
'sphinx.ext.autodoc',
|
'sphinx.ext.autodoc',
|
||||||
#'sphinx.ext.intersphinx',
|
#'sphinx.ext.intersphinx',
|
||||||
'oslosphinx',
|
|
||||||
'reno.sphinxext',
|
'reno.sphinxext',
|
||||||
]
|
]
|
||||||
|
|
||||||
|
if has_oslosphinx:
|
||||||
|
extensions.append('oslosphinx')
|
||||||
|
|
||||||
# autodoc generation is a bit aggressive and a nuisance when doing heavy
|
# autodoc generation is a bit aggressive and a nuisance when doing heavy
|
||||||
# text edit cycles.
|
# text edit cycles.
|
||||||
# execute "export SPHINX_DEBUG=1" in your terminal to disable
|
# execute "export SPHINX_DEBUG=1" in your terminal to disable
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
---
|
||||||
|
other:
|
||||||
|
- The oslosphinx dependency for building documentation
|
||||||
|
is now optional. This breaks a build cycle between
|
||||||
|
oslosphinx and reno.
|
Loading…
Reference in New Issue