diff options
author | isaackwy <isaacyu@protonmail.com> | 2023-12-22 00:17:17 -0800 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2023-12-29 18:49:33 +0700 |
commit | 395a970d0a55d50be90027ab25f7976205e937b4 (patch) | |
tree | 6d9383d8f80d00506d64d73501e7100718ae0c16 | |
parent | 861e32b2063fc905627189cdff5bda071af5aca4 (diff) |
development/jupyter-notebook: Fix errors associated with traitlets>=5.10
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
-rw-r--r-- | development/jupyter-notebook/fix-traitlets-error.patch | 21 | ||||
-rw-r--r-- | development/jupyter-notebook/jupyter-notebook.SlackBuild | 6 |
2 files changed, 26 insertions, 1 deletions
diff --git a/development/jupyter-notebook/fix-traitlets-error.patch b/development/jupyter-notebook/fix-traitlets-error.patch new file mode 100644 index 0000000000000..b0994d5411264 --- /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 941e5484c02a5..efd511a7c4310 100644 --- a/development/jupyter-notebook/jupyter-notebook.SlackBuild +++ b/development/jupyter-notebook/jupyter-notebook.SlackBuild @@ -27,7 +27,7 @@ cd $(dirname $0) ; CWD=$(pwd) PRGNAM=jupyter-notebook VERSION=${VERSION:-6.5.4} -BUILD=${BUILD:-1} +BUILD=${BUILD:-2} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} @@ -79,6 +79,10 @@ 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 \ |