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
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.

View file

@ -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 {} \;