Commit 6fce2fa54083d84a2437fc130336b0f02c0a6d0b

Authored by Luigi Tibaldo
1 parent 25c39cb1

Made nbsphinx an optional extension

Showing 1 changed file with 9 additions and 3 deletions
doc/source/conf.py
... ... @@ -35,6 +35,15 @@ except:
35 35 'WARNING: Please install it to get fully-functional Sphinx docs.\n'
36 36 'WARNING: https://pypi.python.org/pypi/sphinxcontrib-doxylink\n')
37 37  
  38 +try:
  39 + import nbsphinx
  40 + extensions += ['nbsphinx']
  41 +except:
  42 + print('WARNING: Python package `nbsphinx` not found.\n'
  43 + 'WARNING: Please install it to get fully-functional Sphinx docs.\n'
  44 + 'WARNING: https://nbsphinx.readthedocs.io/\n')
  45 +
  46 +
38 47 # Raw files to be copied over
39 48 #sys.path.append(os.path.abspath('exts'))
40 49 #extensions = ['rawfiles']
... ... @@ -268,6 +277,3 @@ texinfo_documents = [
268 277 doxylink = {
269 278 'doxy' : ('doc/html/doxygen/ctools.tag', 'doxygen/'),
270 279 }
271   -
272   -# Add extension to generate docs from Jupyter notebooks
273   -extensions = ['nbsphinx']
... ...