deb_ndsphinx_optional
authorDebian Science Team <debian-science-maintainers@lists.alioth.debian.org>
Sun, 28 Jun 2020 20:47:22 +0000 (21:47 +0100)
committerRebecca N. Palmer <rebecca_palmer@zoho.com>
Sun, 28 Jun 2020 20:47:22 +0000 (21:47 +0100)
Gbp-Pq: Name deb_ndsphinx_optional

doc/source/conf.py

index fc007ff28d227bc771902f47710490b2cf542cb7..e946813e91cc1f0bd93894ef46c1284cfbd0811d 100644 (file)
@@ -63,11 +63,16 @@ extensions = [
     "sphinx.ext.mathjax",
     "sphinx.ext.ifconfig",
     "sphinx.ext.linkcode",
-    "nbsphinx",
+    "nbsphinx",
     "contributors",  # custom pandas extension
 ]
 
 mathjax_path="MathJax.js"
+try:
+    import nbsphinx
+    extensions += ["nbsphinx"]
+except:
+    pass  # survive without
 
 exclude_patterns = ["**.ipynb_checkpoints"]
 try: