summaryrefslogtreecommitdiffstats
path: root/development/jupyter-notebook
diff options
context:
space:
mode:
Diffstat (limited to 'development/jupyter-notebook')
-rw-r--r--development/jupyter-notebook/README4
-rw-r--r--development/jupyter-notebook/doinst.sh9
-rw-r--r--development/jupyter-notebook/fix-traitlets-error.patch21
-rw-r--r--development/jupyter-notebook/jupyter-notebook.SlackBuild34
-rw-r--r--development/jupyter-notebook/jupyter-notebook.info12
5 files changed, 61 insertions, 19 deletions
diff --git a/development/jupyter-notebook/README b/development/jupyter-notebook/README
index 02b8ec5480..e11ee1682d 100644
--- a/development/jupyter-notebook/README
+++ b/development/jupyter-notebook/README
@@ -1,5 +1,5 @@
-Jupyter notebook is a language-agnostic HTML notebook application for Project
-Jupyter.
+Jupyter notebook is a language-agnostic HTML notebook application for
+Project Jupyter.
Jupyter kernels are needed for the notebook to be fully functional. The
following kernels are currently available as SlackBuilds:
diff --git a/development/jupyter-notebook/doinst.sh b/development/jupyter-notebook/doinst.sh
new file mode 100644
index 0000000000..65c7e2eeb9
--- /dev/null
+++ b/development/jupyter-notebook/doinst.sh
@@ -0,0 +1,9 @@
+if [ -x /usr/bin/update-desktop-database ]; then
+ /usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1
+fi
+
+if [ -e usr/share/icons/hicolor/icon-theme.cache ]; then
+ if [ -x /usr/bin/gtk-update-icon-cache ]; then
+ /usr/bin/gtk-update-icon-cache -f usr/share/icons/hicolor >/dev/null 2>&1
+ fi
+fi
diff --git a/development/jupyter-notebook/fix-traitlets-error.patch b/development/jupyter-notebook/fix-traitlets-error.patch
new file mode 100644
index 0000000000..b0994d5411
--- /dev/null
+++ b/development/jupyter-notebook/fix-traitlets-error.patch
@@ -0,0 +1,21 @@
+--- a/notebook/notebookapp.py
++++ b/notebook/notebookapp.py
+@@ -1408,7 +1408,7 @@
+ # and allow jupyter_server contents managers to pass
+ # through. If jupyter_server is not installed, this class
+ # will be ignored.
+- 'jupyter_server.contents.services.managers.ContentsManager'
++ "jupyter_server.services.contents.managers.ContentsManager",
+ ],
+ config=True,
+ help=_('The notebook manager class to use.')
+--- a/notebook/traittypes.py
++++ b/notebook/traittypes.py
+@@ -1,5 +1,6 @@
+ import inspect
+-from traitlets import ClassBasedTraitType, Undefined, warn
++from warnings import warn
++from traitlets import ClassBasedTraitType, Undefined
+
+ # Traitlet's 5.x includes a set of utilities for building
+ # description strings for objects. Traitlets 5.x does not
diff --git a/development/jupyter-notebook/jupyter-notebook.SlackBuild b/development/jupyter-notebook/jupyter-notebook.SlackBuild
index 54a1cdedd0..efd511a7c4 100644
--- a/development/jupyter-notebook/jupyter-notebook.SlackBuild
+++ b/development/jupyter-notebook/jupyter-notebook.SlackBuild
@@ -1,8 +1,9 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for jupyter-notebook
-# Copyright 2017-2019 Benjamin Trigona-Harany <slackbuilds@jaxartes.net>
+# Copyright 2017-2021 Benjamin Trigona-Harany <slackbuilds@jaxartes.net>
+# Copyright 2022-2023 Isaac Yu <isaacyu@protonmail.com>
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -22,11 +23,15 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-SRCNAM=notebook
-PRGNAM=jupyter-$SRCNAM
-VERSION=${VERSION:-6.0.2}
-BUILD=${BUILD:-1}
+cd $(dirname $0) ; CWD=$(pwd)
+
+PRGNAM=jupyter-notebook
+VERSION=${VERSION:-6.5.4}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
+
+SRCNAM=notebook
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -36,7 +41,11 @@ if [ -z "$ARCH" ]; then
esac
fi
-CWD=$(pwd)
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
@@ -70,19 +79,22 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+# Fix traitlets warning and error:
+# https://github.com/jupyter/notebook/pull/7051
+patch -p1 < $CWD/fix-traitlets-error.patch
+
python3 setup.py install --root=$PKG
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a \
- LICENSE README.md \
- $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a CHANGELOG.md CONTRIBUTING.rst LICENSE README.md $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
+cat $CWD/doinst.sh > $PKG/install/doinst.sh
cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
diff --git a/development/jupyter-notebook/jupyter-notebook.info b/development/jupyter-notebook/jupyter-notebook.info
index da8e8b67bc..6794b929fc 100644
--- a/development/jupyter-notebook/jupyter-notebook.info
+++ b/development/jupyter-notebook/jupyter-notebook.info
@@ -1,10 +1,10 @@
PRGNAM="jupyter-notebook"
-VERSION="6.0.2"
+VERSION="6.5.4"
HOMEPAGE="https://jupyter.org/"
-DOWNLOAD="https://files.pythonhosted.org/packages/source/n/notebook/notebook-6.0.2.tar.gz"
-MD5SUM="a2292ca8d26f98cf7b202ba4fb484707"
+DOWNLOAD="https://files.pythonhosted.org/packages/source/n/notebook/notebook-6.5.4.tar.gz"
+MD5SUM="6a2f44954dfa39c55bba2f576dd59e4a"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
-REQUIRES="Jinja2 ipaddress python3-jupyter-ipykernel jupyter-nbconvert python-prometheus_client singledispatch send2trash terminado"
-MAINTAINER="Benjamin Trigona-Harany"
-EMAIL="slackbuilds@jaxartes.net"
+REQUIRES="jupyter-ipykernel jupyter-nbclassic ipython_genutils"
+MAINTAINER="Isaac Yu"
+EMAIL="isaacyu@protonmail.com"