From 45a9ec5fb2a26f5892a84c51cb7aa1a12fff99d8 Mon Sep 17 00:00:00 2001 From: Christoph Willing Date: Fri, 30 Jun 2023 10:02:08 +1000 Subject: [PATCH] development/python3-numpy: Tidy up Signed-off-by: Christoph Willing Signed-off-by: Willy Sudiarto Raharjo --- development/python3-numpy/README | 4 +-- .../python3-numpy/python3-numpy.SlackBuild | 28 ++++++++----------- 2 files changed, 13 insertions(+), 19 deletions(-) diff --git a/development/python3-numpy/README b/development/python3-numpy/README index 5ac99577b3..75d304b7fb 100644 --- a/development/python3-numpy/README +++ b/development/python3-numpy/README @@ -34,5 +34,5 @@ IMPORTANT: The version installed by this SlackBuild does NOT include the is available for python2 only and does not conflict with this installation of numpy. -This python3-numpy SlackBuild creates bindings for python3 and can be -installed without conflict alongside the python2-numpy SlackBuild. +Due to the verion of Cython in Slackware 15.0, the latest version of this +python3-numpy SlackBuild will be held at 1.22.3. diff --git a/development/python3-numpy/python3-numpy.SlackBuild b/development/python3-numpy/python3-numpy.SlackBuild index 483a2ad5c1..d72939ed4d 100644 --- a/development/python3-numpy/python3-numpy.SlackBuild +++ b/development/python3-numpy/python3-numpy.SlackBuild @@ -1,8 +1,8 @@ #!/bin/bash -# Slackware build script for numpy3 +# Slackware build script for python3-numpy -# Copyright 2015-2022 Christoph Willing Brisbane, Australia +# Copyright 2015-2023 Christoph Willing Brisbane, Australia # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -34,8 +34,6 @@ BUILD=${BUILD:-1} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} -PYTHON_VERSIONS="3" - if [ -z "$ARCH" ]; then case "$( uname -m )" in i?86) ARCH=i586 ;; @@ -124,22 +122,18 @@ case "$DEBUG" in *) DEBUG="" ;; esac -for v in $PYTHON_VERSIONS ; do - if [ $(which python$v 2>/dev/null) ]; then - if [ ! "$DEBUG" ]; then - NPY_RELAXED_STRIDES_CHECKING=${NPY_RSC:-1} python$v setup.py install --root $PKG +if [ ! "$DEBUG" ]; then + NPY_RELAXED_STRIDES_CHECKING=${NPY_RSC:-1} python3 setup.py install --root $PKG - find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \ - | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true - else - NPY_RELAXED_STRIDES_CHECKING=${NPY_RSC:-1} python$v setup.py build --debug - python$v setup.py install --root $PKG - fi - fi -done + find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \ + | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true +else + NPY_RELAXED_STRIDES_CHECKING=${NPY_RSC:-1} python3 setup.py build --debug + python3 setup.py install --root $PKG +fi mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION -cp -a LICENSE.txt THANKS.txt INSTALL.rst.txt PKG-INFO \ +cp -a INSTALL.rst.txt LICENSE.txt README.md THANKS.txt \ $PKG/usr/doc/$PRGNAM-$VERSION cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild find $PKG/usr/doc -type f -exec chmod 0644 {} \;