summaryrefslogtreecommitdiffstats
path: root/python/tqdm/tqdm.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'python/tqdm/tqdm.SlackBuild')
-rw-r--r--python/tqdm/tqdm.SlackBuild30
1 files changed, 20 insertions, 10 deletions
diff --git a/python/tqdm/tqdm.SlackBuild b/python/tqdm/tqdm.SlackBuild
index 7dce6efaa7..59dd3c1566 100644
--- a/python/tqdm/tqdm.SlackBuild
+++ b/python/tqdm/tqdm.SlackBuild
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for tqdm
@@ -23,10 +23,15 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# 20231221 46and2: Newer setuptools needed to build properly.
+
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=tqdm
-VERSION=${VERSION:-4.36.1}
-BUILD=${BUILD:-1}
+VERSION=${VERSION:-4.66.1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
i?86) ARCH=i586 ;;
@@ -34,7 +39,12 @@ if [ -z "$ARCH" ]; then
*) ARCH=$( uname -m ) ;;
esac
fi
-CWD=$(pwd)
+
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
@@ -65,12 +75,12 @@ 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 {} \;
-python setup.py install --root=$PKG
+# 46and2: newer setuptools needed
+PYVER=$(python3 -c 'import sys; print("%d.%d" % sys.version_info[:2])')
+export PYTHONPATH=/opt/python$PYVER/site-packages/
-# Python 3 support.
-if $(python3 -c 'import sys' 2>/dev/null); then
- python3 setup.py install --root=$PKG
-fi
+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
@@ -83,4 +93,4 @@ mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE