diff options
author | Serban Udrea <S.Udrea@gsi.de> | 2024-08-01 10:32:52 +0700 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2024-08-01 12:36:00 +0700 |
commit | 48cb6bb82491ac5aec2a092742283101a0a6b8ed (patch) | |
tree | 9dc0ac81c03021bd36c9a0ca0a87ead37b900167 | |
parent | b99ddb3f1afaa547939859270c801cb1e5b9bd2b (diff) |
development/python3-matplotlib: Updated for version 3.8.4.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
-rw-r--r-- | development/python3-matplotlib/README | 60 | ||||
-rw-r--r-- | development/python3-matplotlib/python3-matplotlib.SlackBuild | 42 | ||||
-rw-r--r-- | development/python3-matplotlib/python3-matplotlib.info | 9 |
3 files changed, 90 insertions, 21 deletions
diff --git a/development/python3-matplotlib/README b/development/python3-matplotlib/README index 6f322abe87eb8..d6d4fe8a1aff9 100644 --- a/development/python3-matplotlib/README +++ b/development/python3-matplotlib/README @@ -7,12 +7,58 @@ of ipython uses matplotlib to emulate matlab graphics. This is the Python 3 version of matplotlib and can coexist with SBo's matplotlib package. -OPTIONAL DEPENDENCIES: wxPython4, python3-pytest, avconv, Inkscape +OPTIONAL DEPENDENCIES +===================== +Only those optional dependencies are listed below which are not already +provided by Slackware, and can be installed by means of a SlackBuild. -NOTES: If you want to enable the optional subpackages tests and - toolkits_tests you need to set the variable ENABLE_TESTS - to "yes" when executing the SlackBuild and make sure that - python3-pytest, ffmpeg, avconv and Inkscape are already - installed. Besides ffmpeg/avconv are also needed if you - wish better support of animation output formats. +For extended capabilities +^^^^^^^^^^^^^^^^^^^^^^^^^ + +python3-tornado +jupyter-ipykernel +wxPython4 +python3-cairocffi +texlive-extra + +NOTE: The LaTeX package cm-super is not provided by Slackware. + Presently, the only way to install it through a SlackBuild is to + use texlive-extra which is huge. You may consider installing it + manually. The zip file is available at: + https://ctan.org/pkg/cm-super?lang=en + + +For self-tests +^^^^^^^^^^^^^^ + +python3-pytest +inkscape +jupyter-nbformat +jupyter-nbconvert +python3-pandas +pikepdf +python3-psutil +python3-pytest-cov +python3-pytest-timeout +pytz +Sphinx +python3-xarray + +NOTES: 1) python3-pytest becomes mandatory, if one wishes to let + matplotlib perform the self-tests. + 2) The SlackBuild has to be executed with ENABLE_TESTS set to + "yes". + 3) The amount of performed testing depends on the optional + dependencies installed besides python3-pytest. However, + please note that several tests fail, if cm-super is missing, + see also the previous note. + 4) To actually run the self-tests execute: + pytest3 --pyargs matplotlib.tests + as a normal user, after matplotlib got installed. + Consider doing this from within an empty directory, since some + "garbage" is left behind. + + +The present SlackBuild does not build matplotlib's documentation. This +is not planned to change any day soon. diff --git a/development/python3-matplotlib/python3-matplotlib.SlackBuild b/development/python3-matplotlib/python3-matplotlib.SlackBuild index db63d6b275c7a..b52a8387d6f5f 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 diff --git a/development/python3-matplotlib/python3-matplotlib.info b/development/python3-matplotlib/python3-matplotlib.info index 3afd76cbece5c..d670aa3d9139c 100644 --- a/development/python3-matplotlib/python3-matplotlib.info +++ b/development/python3-matplotlib/python3-matplotlib.info @@ -1,14 +1,15 @@ PRGNAM="python3-matplotlib" -VERSION="3.4.3" +VERSION="3.8.4" HOMEPAGE="https://matplotlib.org/" -DOWNLOAD="https://files.pythonhosted.org/packages/21/37/197e68df384ff694f78d687a49ad39f96c67b8d75718bc61503e1676b617/matplotlib-3.4.3.tar.gz \ +DOWNLOAD="https://files.pythonhosted.org/packages/38/4f/8487737a74d8be4ab5fbe6019b0fae305c1604cf7209500969b879b5f462/matplotlib-3.8.4.tar.gz \ https://downloads.sourceforge.net/project/freetype/freetype2/2.6.1/freetype-2.6.1.tar.gz \ http://www.qhull.org/download/qhull-2020-src-8.0.2.tgz" -MD5SUM="6858958370a26cccfa81abc7b6dd3622 \ +MD5SUM="d8635506f70b398b48a2cd2fdc1627cb \ 348e667d728c597360e4a87c16556597 \ 295f7332269a38279478f555cc185296" DOWNLOAD_x86_64="" MD5SUM_x86_64="" -REQUIRES="python3-numpy python3-dateutil pytz python3-cycler python3-kiwisolver python3-tornado" +REQUIRES="python3-contourpy python3-cycler python3-dateutil python3-fonttools python3-kiwisolver \ + python3-numpy importlib-resources pybind11 python3-setuptools-scm-opt" MAINTAINER="Serban Udrea" EMAIL="S.Udrea@gsi.de" |