summaryrefslogtreecommitdiff
path: root/python/argon2-cffi/argon2-cffi.SlackBuild
diff options
context:
space:
mode:
authorIsaac Yu <isaacyu1@isaacyu1.com>2022-10-08 01:34:32 -0700
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2022-10-10 23:34:34 +0700
commitd686897b14e64851c25f7eeb6be0a13f78a6b8aa (patch)
tree675c295feb425f924acf734fd651a3507ec1378d /python/argon2-cffi/argon2-cffi.SlackBuild
parent0eefdb011b092fc09bbe43f997d9efc1b9637b3e (diff)
downloadslackbuilds-d686897b14e64851c25f7eeb6be0a13f78a6b8aa.tar.gz
python/argon2-cffi: Change build method to python3-flit_core
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'python/argon2-cffi/argon2-cffi.SlackBuild')
-rw-r--r--python/argon2-cffi/argon2-cffi.SlackBuild20
1 files changed, 4 insertions, 16 deletions
diff --git a/python/argon2-cffi/argon2-cffi.SlackBuild b/python/argon2-cffi/argon2-cffi.SlackBuild
index e58bf10373..6e3a877f53 100644
--- a/python/argon2-cffi/argon2-cffi.SlackBuild
+++ b/python/argon2-cffi/argon2-cffi.SlackBuild
@@ -27,7 +27,7 @@ cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=argon2-cffi
VERSION=${VERSION:-21.3.0}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@@ -80,27 +80,15 @@ 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, find_packages
-setup(name='${PRGNAM}',
- version='${VERSION}',
- packages=find_packages(where="src"),
- package_dir={"": "src"},
-)
-EOF
-
-# With the shim, it's a good idea to use "unshare -n" to prevent downloading
-# anything extra:
-env ARGON2_CFFI_USE_SYSTEM=1 \
- 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 \
- AUTHORS.rst CHANGELOG.md FAQ.rst LICENSE README.rst \
+ AUTHORS.rst CHANGELOG.md FAQ.rst README.rst \
$PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild