summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
author Isaac Yu2022-09-26 21:02:22 +0200
committer Willy Sudiarto Raharjo2022-10-01 04:01:19 +0200
commite231187b4288383aae5662fa766a15111fed48bc (patch)
treea15e723b4e923c936758fe1760eb3b898f8105ae
parent5e6f95c4388b6b46c1f90e21dc65d76b5b0d5b24 (diff)
downloadslackbuilds-e231187b4288383aae5662fa766a15111fed48bc.tar.gz
development/jupyter_core: Change build method to python3-hatchling.
Signed-off-by: Andrew Clemons <andrew.clemons@gmail.com> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
-rw-r--r--development/jupyter_core/jupyter_core.SlackBuild33
-rw-r--r--development/jupyter_core/jupyter_core.info2
2 files changed, 5 insertions, 30 deletions
diff --git a/development/jupyter_core/jupyter_core.SlackBuild b/development/jupyter_core/jupyter_core.SlackBuild
index 19ff1ec940..c5c54a544a 100644
--- a/development/jupyter_core/jupyter_core.SlackBuild
+++ b/development/jupyter_core/jupyter_core.SlackBuild
@@ -27,7 +27,7 @@ cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=jupyter_core
VERSION=${VERSION:-4.11.1}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@@ -80,39 +80,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 {} \;
-# Use this setup.py shim:
-cat << EOF > setup.py
-from setuptools import setup
-import os
-here = os.path.abspath(os.path.dirname(__file__))
-pjoin = os.path.join
-packages = []
-for d, _, _ in os.walk(pjoin(here, 'jupyter_core')):
- packages.append(d[len(here)+1:].replace(os.path.sep, '.'))
-setup(name='${PRGNAM}',
- version='${VERSION}',
- packages=packages,
- py_modules=['jupyter'],
- entry_points={
- 'console_scripts': [
- 'jupyter = jupyter_core.command:main',
- 'jupyter-migrate = jupyter_core.migrate:main',
- 'jupyter-troubleshoot = jupyter_troubleshoot.migrate:main',
- ],
- },
- package_data={'': ['*']},
-)
-EOF
-
-# With the shim, it's a good idea to use "unshare -n" to prevent downloading
-# anything extra:
-unshare -n python3 setup.py install --root=$PKG || exit 1
+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 CONTRIBUTING.md COPYING.md README.md $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a CONTRIBUTING.md README.md $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install
diff --git a/development/jupyter_core/jupyter_core.info b/development/jupyter_core/jupyter_core.info
index 313df9c0b7..ef07e0f2d7 100644
--- a/development/jupyter_core/jupyter_core.info
+++ b/development/jupyter_core/jupyter_core.info
@@ -5,6 +5,6 @@ DOWNLOAD="https://github.com/jupyter/jupyter_core/archive/4.11.1/jupyter_core-4.
MD5SUM="215d4a5171e12da232c719219be141e2"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
-REQUIRES="traitlets"
+REQUIRES="traitlets python3-hatchling"
MAINTAINER="Isaac Yu"
EMAIL="isaacyu1@isaacyu1.com"