development/jupyter_packaging: Update for 0.12.3

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
isaackwy 2024-03-16 13:31:49 -07:00 committed by Willy Sudiarto Raharjo
parent c010b45784
commit f8fe5dd07f
No known key found for this signature in database
GPG key ID: 3F617144D7238786
3 changed files with 9 additions and 51 deletions

View file

@ -2,7 +2,7 @@
# Slackware build script for jupyter_packaging
# 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
@ -25,7 +25,7 @@
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=jupyter_packaging
VERSION=${VERSION:-0.11.1}
VERSION=${VERSION:-0.12.3}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@ -47,20 +47,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
@ -76,17 +62,14 @@ 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 {} \;
# Don't install tests in site-packages. Patch by mgorny:
# https://github.com/jupyter/jupyter-packaging/commit/a3b4c9b9.patch
patch -p1 < $CWD/no-install-tests.patch
python3 setup.py install --root=$PKG
python3 -m build --no-isolation
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 PKG-INFO README.md $PKG/usr/doc/$PRGNAM-$VERSION
cp -a CHANGELOG.md PKG-INFO README.md RELEASE.md $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install

View file

@ -1,10 +1,10 @@
PRGNAM="jupyter_packaging"
VERSION="0.11.1"
VERSION="0.12.3"
HOMEPAGE="https://jupyter.org/"
DOWNLOAD="https://pypi.io/packages/source/j/jupyter_packaging/jupyter_packaging-0.11.1.tar.gz"
MD5SUM="6d39c1382acccdc5dd85ce5702c9ef8f"
DOWNLOAD="https://pypi.io/packages/source/j/jupyter_packaging/jupyter_packaging-0.12.3.tar.gz"
MD5SUM="9c6834023bd699bda5365ab7ed18bde2"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES="python3-deprecation python3-tomlkit"
REQUIRES="python3-deprecation python3-hatchling python3-tomlkit"
MAINTAINER="Isaac Yu"
EMAIL="isaacyu@protonmail.com"

View file

@ -1,25 +0,0 @@
From a3b4c9b9735dee8b407b7cdacc27301bc9af283b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
Date: Fri, 25 Mar 2022 10:50:03 +0100
Subject: [PATCH] do not install tests as a top-level package
Explicitly exclude tests from being found by find_packages().
Otherwise, they are installed as top-level site-packages/tests.
---
setup.cfg | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/setup.cfg b/setup.cfg
index 9dc7a64..9dc9f11 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -39,5 +39,9 @@ install_requires =
[options.extras_require]
test = build; coverage; pre-commit; pytest; pytest-cov; pytest-mock
+[options.packages.find]
+exclude =
+ tests
+
[bdist_wheel]
universal=1