summaryrefslogtreecommitdiffstats
path: root/python/BeautifulSoup4/BeautifulSoup4.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'python/BeautifulSoup4/BeautifulSoup4.SlackBuild')
-rw-r--r--python/BeautifulSoup4/BeautifulSoup4.SlackBuild52
1 files changed, 7 insertions, 45 deletions
diff --git a/python/BeautifulSoup4/BeautifulSoup4.SlackBuild b/python/BeautifulSoup4/BeautifulSoup4.SlackBuild
index 74338d9973..67a9626f88 100644
--- a/python/BeautifulSoup4/BeautifulSoup4.SlackBuild
+++ b/python/BeautifulSoup4/BeautifulSoup4.SlackBuild
@@ -3,7 +3,8 @@
# Slackware build script for BeautifulSoup4
# Copyright 2014-2018 Dimitris Zlatanidis Orestiada, Greece
-# Copyright 2020-2021 Isaac Yu <isaacyu1@isaacyu1.com>
+# Copyright 2020-2022 Isaac Yu <isaacyu@protonmail.com>
+# Copyright 2023-2024 Giancarlo Dessì, Cagliari, IT, <slack@giand.it>
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -26,8 +27,8 @@
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=BeautifulSoup4
-VERSION=${VERSION:-4.9.3}
-BUILD=${BUILD:-2}
+VERSION=${VERSION:-4.12.3}
+BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@@ -41,9 +42,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
@@ -53,20 +51,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
@@ -82,36 +66,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 {} \;
-python2 setup.py install --root=$PKG
-
-# Python 3 support (requires python3-soupsieve)
-# shaypal5 provided an example package check:
-# https://gist.github.com/shaypal5/d505af9953cd86f59c750fa600ee4ba6
-if $(python3 -c 'import pkgutil; exit(not pkgutil.find_loader("soupsieve"))'); then
-
- # Prepare another source tarball before building for Python 3
- cd $TMP
- rm -rf $SRCNAM-$VERSION
- tar xvf $CWD/$SRCNAM-$VERSION.tar.gz
- cd $SRCNAM-$VERSION
- chown -R root:root .
- find -L . \
- \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
- -o -perm 511 \) -exec chmod 755 {} \; -o \
- \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
- -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
-
- # Build for Python 3
- sed -i "s/-rfI/-rf/" convert-py3k
- sh convert-py3k
- python3 setup.py install --root=$PKG
-fi
+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 README.md COPYING.txt NEWS.txt TODO.txt doc/* $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a AUTHORS CHANGELOG LICENSE NEWS.txt README.md $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install