summaryrefslogtreecommitdiffstats
path: root/python/python3-astroid/python3-astroid.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'python/python3-astroid/python3-astroid.SlackBuild')
-rw-r--r--python/python3-astroid/python3-astroid.SlackBuild17
1 files changed, 9 insertions, 8 deletions
diff --git a/python/python3-astroid/python3-astroid.SlackBuild b/python/python3-astroid/python3-astroid.SlackBuild
index e2e185332b..e106c9ffcc 100644
--- a/python/python3-astroid/python3-astroid.SlackBuild
+++ b/python/python3-astroid/python3-astroid.SlackBuild
@@ -2,6 +2,7 @@
# Slackware build script for python3-astroid
+# Copyright 2022-2023 Dimitris Zlatanidis Orestiada, Greece
# Copyright 2018-2019 Markus Rinne Finland
# All rights reserved.
#
@@ -26,7 +27,7 @@ cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=python3-astroid
SRCNAM=astroid
-VERSION=${VERSION:-2.6.5}
+VERSION=${VERSION:-3.0.2}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@@ -39,9 +40,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
@@ -80,15 +78,18 @@ 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
+# Beacause of the python3-setuptools-opt
+PYVER=$(python3 -c 'import sys; print("%d.%d" % sys.version_info[:2])')
+export PYTHONPATH=/opt/python$PYVER/site-packages/
+
+python3 -m build --wheel --no-isolation
+python3 -m installer --destdir "$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 \
- $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a LICENSE README.rst PKG-INFO $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install