summaryrefslogtreecommitdiffstats
path: root/python-numpy/build/python-numpy.SlackBuild
diff options
context:
space:
mode:
author Eric Hameleers <alien@slackware.com>2021-10-21 14:16:22 +0000
committer Eric Hameleers <alien@slackware.com>2021-10-21 14:16:22 +0000
commit8cdf08842e80c5b872b6743b3f953237be5d92f9 (patch)
tree688bb2bd1df7239f0cb30749beafb3b2d7b17c71 /python-numpy/build/python-numpy.SlackBuild
parent45afd3c7718df1c8daa60a3a5821f7cdb66a5529 (diff)
downloadasb-8cdf08842e80c5b872b6743b3f953237be5d92f9.tar.gz
asb-8cdf08842e80c5b872b6743b3f953237be5d92f9.tar.xz
python-numpy: updated to 1.21.3 because the 1.16.x releases do not support the new Python 3.10 in Slackware
Diffstat (limited to 'python-numpy/build/python-numpy.SlackBuild')
-rwxr-xr-xpython-numpy/build/python-numpy.SlackBuild25
1 files changed, 11 insertions, 14 deletions
diff --git a/python-numpy/build/python-numpy.SlackBuild b/python-numpy/build/python-numpy.SlackBuild
index 859dcd33..1ec8104b 100755
--- a/python-numpy/build/python-numpy.SlackBuild
+++ b/python-numpy/build/python-numpy.SlackBuild
@@ -35,9 +35,10 @@
# * Initial build.
# 1.16.6-1: 28/oct/2020 by Eric Hameleers <alien@slackware.com>
# * Update. Newer releases than 1.16.x drop Python2 support.
-# 1.16.6-2: 19/oct/2021 by Eric Hameleers <alien@slackware.com>
-# * Rebuilt for Python 3.10.
-# Newer releases than 1.16.x drop Python2 support.
+# 1.21.3-1: 21/oct/2021 by Eric Hameleers <alien@slackware.com>
+# * Updated for Python 3.10.
+# Newer releases than 1.16.x drop Python2 support, but 1.1x
+# does not support Python 3.10 either.
#
# Run 'sh python-numpy.SlackBuild' to build a Slackware package.
# The package (.t?z) and .txt file as well as build logs are created in /tmp .
@@ -47,8 +48,8 @@
PRGNAM=python-numpy
SRCNAM=numpy
-VERSION=${VERSION:-1.16.6}
-BUILD=${BUILD:-2}
+VERSION=${VERSION:-1.21.3}
+BUILD=${BUILD:-1}
NUMJOBS=${NUMJOBS:-" -j$(nproc) "}
TAG=${TAG:-alien}
@@ -156,6 +157,11 @@ cd $TMP/tmp-$PRGNAM
echo "Extracting the source archive(s) for $PRGNAM..."
tar -xvf ${SOURCE}
cd ${SRCNAM}-${VERSION}
+
+# Numpy below 1.2x is not fully compatible with Python 3.10:
+cat $SRCDIR/patches/numpy-1.2x_python310.patch | patch -p1 --verbose \
+ 2>&1 | tee $OUTPUT/patch-${PRGNAM}.log
+
chown -R root:root .
chmod -R u+w,go+r-w,a+rX-st .
@@ -167,15 +173,6 @@ python3 setup.py install \
--prefix=/usr --root=$PKG \
2>&1 | tee $OUTPUT/install-${PRGNAM}_python3.log
-# Install python2 support if that's available:
-if which python2 1>/dev/null 2>/dev/null ; then
- LDFLAGS="$SLKLDFLAGS" \
- CXXFLAGS="$SLKCFLAGS" \
- python setup.py install \
- --prefix=/usr --root=$PKG \
- 2>&1 | tee $OUTPUT/install-${PRGNAM}_python2.log
-fi
-
# Add documentation:
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a $DOCS $PKG/usr/doc/$PRGNAM-$VERSION || true