aboutsummaryrefslogtreecommitdiff
path: root/development/python3-numpy/python3-numpy.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'development/python3-numpy/python3-numpy.SlackBuild')
-rw-r--r--development/python3-numpy/python3-numpy.SlackBuild19
1 files changed, 13 insertions, 6 deletions
diff --git a/development/python3-numpy/python3-numpy.SlackBuild b/development/python3-numpy/python3-numpy.SlackBuild
index e3a11ce05a..3a1c1389f2 100644
--- a/development/python3-numpy/python3-numpy.SlackBuild
+++ b/development/python3-numpy/python3-numpy.SlackBuild
@@ -30,7 +30,7 @@ cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=python3-numpy
SRCNAM=numpy
VERSION=${VERSION:-1.26.3}
-BUILD=${BUILD:-2}
+BUILD=${BUILD:-3}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@@ -56,6 +56,13 @@ TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
+PYVER=${PYVER:-$(python3 -c 'import sys; print("%d.%d" % sys.version_info[:2])')}
+which python$PYVER 2>/dev/null 1>/dev/null
+[ "$?" = "0" ] || {
+ echo "Can't find python$PYVER. Exiting now ..."
+ exit 1
+}
+
set -e
rm -rf $PKG
@@ -114,20 +121,20 @@ case "$DEBUG" in
esac
if [ ! "$DEBUG" ]; then
- NPY_RELAXED_STRIDES_CHECKING=${NPY_RSC:-1} python3 -m build --wheel --no-isolation -Csetup-args="-Dallow-noblas=true"
- python3 -m installer -d "$PKG" dist/*.whl
+ NPY_RELAXED_STRIDES_CHECKING=${NPY_RSC:-1} python$PYVER -m build --wheel --no-isolation -Csetup-args="-Dallow-noblas=true"
+ python$PYVER -m installer -d "$PKG" dist/*.whl
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
+ #NPY_RELAXED_STRIDES_CHECKING=${NPY_RSC:-1} python$PYVER setup.py build --debug
+ #python$PYVER setup.py install --root $PKG
echo "debug here"
fi
mkdir -p $PKG/usr/include
cd $PKG/usr/include
- ln -s $(ls -d /usr/lib${LIBDIRSUFFIX}/python3.*/site-packages)/numpy/core/include/numpy
+ ln -s $(ls -d /usr/lib${LIBDIRSUFFIX}/python$PYVER/site-packages)/numpy/core/include/numpy
cd -
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION