diff options
author | Matteo Bernardini <ponce@slackbuilds.org> | 2021-11-04 15:28:07 +0100 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2021-11-05 22:56:43 +0700 |
commit | a6456d4e2ee37c017f1e63c06e37f1bd72d4f26c (patch) | |
tree | 1c3bfcb1fb2ddd6c1713e23c620c56e05c4269aa /python/BeautifulSoup4/BeautifulSoup4.SlackBuild | |
parent | 89c41f49c7638b83d6f23480fa7579a49bd66b36 (diff) |
python/BeautifulSoup4: Updated for version 4.9.3.
This reverts commit b6d5a8a
Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org>
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'python/BeautifulSoup4/BeautifulSoup4.SlackBuild')
-rw-r--r-- | python/BeautifulSoup4/BeautifulSoup4.SlackBuild | 29 |
1 files changed, 26 insertions, 3 deletions
diff --git a/python/BeautifulSoup4/BeautifulSoup4.SlackBuild b/python/BeautifulSoup4/BeautifulSoup4.SlackBuild index 411127ea11..74338d9973 100644 --- a/python/BeautifulSoup4/BeautifulSoup4.SlackBuild +++ b/python/BeautifulSoup4/BeautifulSoup4.SlackBuild @@ -26,8 +26,8 @@ cd $(dirname $0) ; CWD=$(pwd) PRGNAM=BeautifulSoup4 -VERSION=${VERSION:-4.10.0} -BUILD=${BUILD:-1} +VERSION=${VERSION:-4.9.3} +BUILD=${BUILD:-2} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} @@ -82,7 +82,30 @@ 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 +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 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 |