diff options
author | isaackwy <isaacyu@protonmail.com> | 2024-11-04 13:44:50 -0800 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2024-11-06 15:18:14 +0700 |
commit | 4bdcf68659eb3cf52df2eac9fb75f56a77d04b08 (patch) | |
tree | a81129fb348e9a6ea90d6524f14f4ef646e02f0a /development/jupyterlab_pygments/jupyterlab_pygments.SlackBuild | |
parent | 104db468c3ff1f14cf21bf652f9dd35e6defec96 (diff) |
development/jupyterlab_pygments: Update for 0.3.0
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'development/jupyterlab_pygments/jupyterlab_pygments.SlackBuild')
-rw-r--r-- | development/jupyterlab_pygments/jupyterlab_pygments.SlackBuild | 33 |
1 files changed, 10 insertions, 23 deletions
diff --git a/development/jupyterlab_pygments/jupyterlab_pygments.SlackBuild b/development/jupyterlab_pygments/jupyterlab_pygments.SlackBuild index 2bf9e272b9..5e6824177c 100644 --- a/development/jupyterlab_pygments/jupyterlab_pygments.SlackBuild +++ b/development/jupyterlab_pygments/jupyterlab_pygments.SlackBuild @@ -3,7 +3,7 @@ # Slackware build script for jupyterlab_pygments # Copyright 2021 Benjamin Trigona-Harany <slackbuilds@jaxartes.net> -# Copyright 2022 Isaac Yu <isaacyu@protonmail.com> +# Copyright 2022-2024 Isaac Yu <isaacyu@protonmail.com> # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -26,7 +26,7 @@ cd $(dirname $0) ; CWD=$(pwd) PRGNAM=jupyterlab_pygments -VERSION=${VERSION:-0.2.2} +VERSION=${VERSION:-0.3.0} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} @@ -39,9 +39,6 @@ if [ -z "$ARCH" ]; then esac fi -# If the variable PRINT_PACKAGE_NAME is set, then this script will report what -# the name of the created package would be, and then exit. This information -# could be useful to other scripts. if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE" exit 0 @@ -51,20 +48,6 @@ TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} -if [ "$ARCH" = "i586" ]; then - SLKCFLAGS="-O2 -march=i586 -mtune=i686" - LIBDIRSUFFIX="" -elif [ "$ARCH" = "i686" ]; then - SLKCFLAGS="-O2 -march=i686 -mtune=i686" - LIBDIRSUFFIX="" -elif [ "$ARCH" = "x86_64" ]; then - SLKCFLAGS="-O2 -fPIC" - LIBDIRSUFFIX="64" -else - SLKCFLAGS="-O2" - LIBDIRSUFFIX="" -fi - set -e rm -rf $PKG @@ -80,15 +63,19 @@ 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 {} \; -python3 setup.py install --root=$PKG +PYVER=$(python3 -c 'import sys; print("%d.%d" % sys.version_info[:2])') +export PYTHONPATH=/opt/python$PYVER/site-packages + +# Skip dependency check +# In particular, jupyterlab_pygments lists jupyterlab as a circular dependency +python3 -m build --no-isolation --skip-dependency-check +python3 -m installer -d "$PKG" dist/*.whl 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 README.md $PKG/usr/doc/$PRGNAM-$VERSION cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild mkdir -p $PKG/install |