aboutsummaryrefslogtreecommitdiff
path: root/development/python3-matplotlib/python3-matplotlib.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'development/python3-matplotlib/python3-matplotlib.SlackBuild')
-rw-r--r--development/python3-matplotlib/python3-matplotlib.SlackBuild42
1 files changed, 32 insertions, 10 deletions
diff --git a/development/python3-matplotlib/python3-matplotlib.SlackBuild b/development/python3-matplotlib/python3-matplotlib.SlackBuild
index db63d6b275..b52a8387d6 100644
--- a/development/python3-matplotlib/python3-matplotlib.SlackBuild
+++ b/development/python3-matplotlib/python3-matplotlib.SlackBuild
@@ -25,22 +25,24 @@
# POSSIBILITY OF SUCH DAMAGE.
# Written by Aleksandar Samardzic <asamardzic@gmail.com>
-# Updated to 0.99.1.2 by João Felipe Santos <joao.eel@gmail.com>
+# Updated to 0.99.1.2 by Joao Felipe Santos <joao.eel@gmail.com>
# Patch for libpng borrowed from Arch Linux (no longer needed, 2019.01.31, S.U.)
+# Updated up to version 2.2.3 by Serban Udrea
# Adapted for Python 3 by Jeremy Hansen
-# Updated up to version 3.4.3 by Serban Udrea <S.Udrea@gsi.de>
+# Updated to version 3.4.3 by Willy Sudiarto Raharjo <willysr@slackbuilds.org>
+# Updated to version 3.8.4 by Serban Udrea
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=python3-matplotlib
SRCNAM=matplotlib
-VERSION=${VERSION:-3.4.3}
-BUILD=${BUILD:-2}
+VERSION=${VERSION:-3.8.4}
+BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
-TARBALL_VERSION=${TARBALL_VERSION:-3.4.3} # Tarball may have wrong versioning
+TARBALL_VERSION=${TARBALL_VERSION:-3.8.4} # Tarball may have wrong versioning
ENABLE_TESTS=${ENABLE_TESTS:-N}
if [ -z "$ARCH" ]; then
@@ -82,21 +84,41 @@ find -L . \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
ENABLE_TESTS=$(echo "$ENABLE_TESTS"|cut -b 1|tr a-z A-Z)
-# Use setup.cfg to decide about the optional tests
+# Use mplsetup.cfg to decide about the optional tests
#
-cat setup.cfg.template > setup.cfg
+cat mplsetup.cfg.template > mplsetup.cfg
if [ "$ENABLE_TESTS" = "Y" ]
then
- sed -i "s|#tests = False|tests = True|" setup.cfg
+ cat mplsetup.cfg.template > mplsetup.cfg
+ sed -i "s|#tests = False|tests = True|" mplsetup.cfg
fi
-python3 setup.py install --root $PKG # > ${CWD}/SETUP.OUTPUT 2>&1
+# We need the newer versions of setuptools and setuptools-scm as
+# provided by the python3-setuptools-opt and python3-setuptools-scm-opt
+# SlackBuilds. Thus the following two lines of code:
+#
+PYVER=$(python3 -c 'import sys; print("%d.%d" % sys.version_info[:2])')
+export PYTHONPATH=/opt/python$PYVER/site-packages
+
+# It looks like one needs to use a pyproject.toml file with a lowered
+# minimal version of numpy. Disabling build isolation doesn't seem to
+# work. The build process exits complaining that numpy is not at least
+# at version 2.0.0rc1. In the modified pyproject.toml file the minimum
+# version is set to the one installed by the python3-numpy-legacy
+# SlackBuild.
+#
+#
+sed -i 's|2.0.0rc1|1.24.4|' pyproject.toml
+
+python3 -m build --wheel --no-isolation # > ${CWD}/SETUP.OUTPUT 2>&1
+python3 -m installer --destdir "$PKG" dist/*.whl # > ${CWD}/INSTALL.OUTPUT 2>&1
find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a INSTALL.rst MANIFEST.in README.rst PKG-INFO $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a INSTALL.rst README.md SECURITY.md PKG-INFO CITATION.bib \
+ CODE_OF_CONDUCT.md CITATION.bib CITATION.cff $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install