development/python3-numpy: Tidy up

Signed-off-by: Christoph Willing <chris.willing@linux.com>

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
Christoph Willing 2023-06-30 10:02:08 +10:00 committed by Willy Sudiarto Raharjo
parent b7461df7b7
commit 45a9ec5fb2
No known key found for this signature in database
GPG key ID: 3F617144D7238786
2 changed files with 13 additions and 19 deletions

View file

@ -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 is available for python2 only and does not conflict with this
installation of numpy. installation of numpy.
This python3-numpy SlackBuild creates bindings for python3 and can be Due to the verion of Cython in Slackware 15.0, the latest version of this
installed without conflict alongside the python2-numpy SlackBuild. python3-numpy SlackBuild will be held at 1.22.3.

View file

@ -1,8 +1,8 @@
#!/bin/bash #!/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. # All rights reserved.
# #
# Redistribution and use of this script, with or without modification, is # Redistribution and use of this script, with or without modification, is
@ -34,8 +34,6 @@ BUILD=${BUILD:-1}
TAG=${TAG:-_SBo} TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz} PKGTYPE=${PKGTYPE:-tgz}
PYTHON_VERSIONS="3"
if [ -z "$ARCH" ]; then if [ -z "$ARCH" ]; then
case "$( uname -m )" in case "$( uname -m )" in
i?86) ARCH=i586 ;; i?86) ARCH=i586 ;;
@ -124,22 +122,18 @@ case "$DEBUG" in
*) DEBUG="" ;; *) DEBUG="" ;;
esac esac
for v in $PYTHON_VERSIONS ; do if [ ! "$DEBUG" ]; then
if [ $(which python$v 2>/dev/null) ]; then NPY_RELAXED_STRIDES_CHECKING=${NPY_RSC:-1} python3 setup.py install --root $PKG
if [ ! "$DEBUG" ]; then
NPY_RELAXED_STRIDES_CHECKING=${NPY_RSC:-1} python$v setup.py install --root $PKG
find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \ find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
else else
NPY_RELAXED_STRIDES_CHECKING=${NPY_RSC:-1} python$v setup.py build --debug NPY_RELAXED_STRIDES_CHECKING=${NPY_RSC:-1} python3 setup.py build --debug
python$v setup.py install --root $PKG python3 setup.py install --root $PKG
fi fi
fi
done
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION 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 $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
find $PKG/usr/doc -type f -exec chmod 0644 {} \; find $PKG/usr/doc -type f -exec chmod 0644 {} \;