[Python-modules-commits] [ipywidgets] 01/01: Ensure that at least one notebook module is available in postinst

Gordon Ball chronitis-guest at moszumanska.debian.org
Fri Dec 30 20:23:36 UTC 2016


This is an automated email from the git hooks/post-receive script.

chronitis-guest pushed a commit to branch master
in repository ipywidgets.

commit 14b98b8ce011bd58966b18b23b8e2f908fc6b5c2
Author: Gordon Ball <gordon at chronitis.net>
Date:   Fri Dec 30 21:21:44 2016 +0100

    Ensure that at least one notebook module is available in postinst
---
 debian/jupyter-nbextension-jupyter-js-widgets.postinst | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/debian/jupyter-nbextension-jupyter-js-widgets.postinst b/debian/jupyter-nbextension-jupyter-js-widgets.postinst
index bee5a7d..9b918ca 100644
--- a/debian/jupyter-nbextension-jupyter-js-widgets.postinst
+++ b/debian/jupyter-nbextension-jupyter-js-widgets.postinst
@@ -23,8 +23,13 @@ case "$1" in
     configure)
         if python3 -c "import notebook.nbextensions" 2>/dev/null; then
             PYTHON=python3
-        else
+        elif python -c "import notebook.nbextensions" 2>/dev/null; then
             PYTHON=python
+        else
+            echo "notebook.nbextensions unavailable for either python or python3"
+            echo "the extension will not be enabled; ensure the python module is"
+            echo "installed and then reconfigure this package"
+            PYTHON=/bin/true
         fi
         $PYTHON -m notebook.nbextensions enable --sys-prefix jupyter-js-widgets/extension
     ;;

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/ipywidgets.git



More information about the Python-modules-commits mailing list