deb_ndsphinx_optional
authorDebian Science Team <debian-science-maintainers@lists.alioth.debian.org>
Sat, 14 Sep 2019 15:37:43 +0000 (16:37 +0100)
committerRebecca N. Palmer <rebecca_palmer@zoho.com>
Sat, 14 Sep 2019 15:37:43 +0000 (16:37 +0100)
Gbp-Pq: Name deb_ndsphinx_optional

doc/source/conf.py

index 1342d74951fcf9c1e2a179ab2ce7f1e946510fe8..32b260ddc80a80026d39e16ed41a1d6fb3cfc21c 100644 (file)
@@ -72,10 +72,14 @@ extensions = ['sphinx.ext.autodoc',
               'sphinx.ext.mathjax',
               'sphinx.ext.ifconfig',
               'sphinx.ext.linkcode',
-              'nbsphinx',
               ]
 
 mathjax_path='MathJax.js'
+try:
+    import nbsphinx
+    extensions += ['nbsphinx']
+except:
+    pass  # survive without
 
 exclude_patterns = ['**.ipynb_checkpoints']