diff --git a/srcpkgs/python3-matplotlib/INSTALL.msg b/srcpkgs/python3-matplotlib/INSTALL.msg index 122b631e24..148661bce4 100644 --- a/srcpkgs/python3-matplotlib/INSTALL.msg +++ b/srcpkgs/python3-matplotlib/INSTALL.msg @@ -1,19 +1 @@ -By default, this package supports only non-interactive graphics output. -For interactive graphics, install: - -- gtk+3 gir-freedesktop python3-gobject python3-cairocffi - (for GTK3Agg/GTK3Cairo backend) -- python3-PyQt5 (for Qt5Agg backend) -- python3-tkinter (for TkAgg backend) -- python3-tornado (for webagg backend) - -To change the backend, you have two ways: - -- /etc/matplotlibrc (system-wide) -- $HOME/.config/matplotlib/matplotlibrc (per-user basis) - -Natively, matplotlib only supports PNG images. Install python3-Pillow -to support more file formats. - -Matplotlib’s LaTeX support requires a working LaTeX installation and -ghostscript. +NOTICE: /etc/matplotlibrc is no longer supported as configuration file diff --git a/srcpkgs/python3-matplotlib/files/README.voidlinux b/srcpkgs/python3-matplotlib/files/README.voidlinux new file mode 100644 index 0000000000..f56b4d9ed0 --- /dev/null +++ b/srcpkgs/python3-matplotlib/files/README.voidlinux @@ -0,0 +1,16 @@ +By default, this package supports only non-interactive graphics output. +For interactive graphics, install: + +- gtk+3 gir-freedesktop python3-gobject python3-cairocffi + (for GTK3Agg/GTK3Cairo backend) +- python3-PyQt5 (for Qt5Agg backend) +- python3-tkinter (for TkAgg backend) +- python3-tornado (for webagg backend) + +The backend can be defined in $XDG_CONFIG_HOME/matplotlib/matplotlibrc + +Natively, matplotlib only supports PNG images. Install python3-Pillow +to support more file formats. + +Matplotlib’s LaTeX support requires a working LaTeX installation and +ghostscript. diff --git a/srcpkgs/python3-matplotlib/patches/matplotlibrc-path-search-fix.patch b/srcpkgs/python3-matplotlib/patches/matplotlibrc-path-search-fix.patch deleted file mode 100644 index 2357130cde..0000000000 --- a/srcpkgs/python3-matplotlib/patches/matplotlibrc-path-search-fix.patch +++ /dev/null @@ -1,19 +0,0 @@ ---- lib/matplotlib/__init__.py.orig -+++ lib/matplotlib/__init__.py -@@ -681,6 +681,8 @@ - if path.is_dir(): - return str(path) - -+ return '/usr/share/matplotlib/mpl-data' -+ - raise RuntimeError('Could not find the matplotlib data files') - - -@@ -742,6 +744,7 @@ - yield os.path.join(matplotlibrc, 'matplotlibrc') - yield os.path.join(get_configdir(), 'matplotlibrc') - yield os.path.join(get_data_path(), 'matplotlibrc') -+ yield '/etc/matplotlibrc' - - for fname in gen_candidates(): - if os.path.exists(fname): diff --git a/srcpkgs/python3-matplotlib/template b/srcpkgs/python3-matplotlib/template index 7a95092817..7182291fa3 100644 --- a/srcpkgs/python3-matplotlib/template +++ b/srcpkgs/python3-matplotlib/template @@ -1,12 +1,12 @@ # Template file for 'python3-matplotlib' pkgname=python3-matplotlib -version=3.1.3 +version=3.2.1 revision=1 wrksrc="matplotlib-${version}" build_style=python3-module -hostmakedepends="pkg-config python3-setuptools" +hostmakedepends="pkg-config python3-setuptools python3-numpy" # XXX use internal copy of agg, highly patched -makedepends="python3-numpy python3-devel freetype-devel libpng-devel libqhull-devel" +makedepends="python3-devel freetype-devel libpng-devel" depends="python3-matplotlib-data>=${version}_${revision} python3-numpy python3-dateutil python3-parsing python3-cycler python3-kiwisolver" short_desc="Python3 2D/3D plotting library" @@ -14,31 +14,17 @@ maintainer="Alessio Sergi " license="custom:matplotlib, BSD-3-Clause, MIT" homepage="https://matplotlib.org/" distfiles="https://github.com/matplotlib/matplotlib/archive/v${version}.tar.gz" -checksum=6edfe021671fcad1bd6081c980c380cb3d66d00895eb8c3450fa3842c441d1d1 - -pre_build() { - # adjust qhull path - sed -i "s|'libqhull',|'qhull',|" setupext.py - # adjust conf file path - sed -i 's,\(site-packages/matplotlib/mpl-data\),/etc,' matplotlibrc.template -} +checksum=5462728ed3be60af21bd8a6b33f5f1632dabdb3c1b3cc279cffb05926a48255c post_install() { + vdoc "${FILESDIR}/README.voidlinux" vlicense LICENSE/LICENSE - # remove data files - rm -rf ${DESTDIR}/usr/lib/python3*/site-packages/matplotlib/mpl-data } python3-matplotlib-data_package() { archs=noarch short_desc+=" - data files" - conf_files="/etc/matplotlibrc" - replaces="python-matplotlib-data<3.0.0" pkg_install() { - vmkdir usr/share/matplotlib - vcopy lib/matplotlib/mpl-data usr/share/matplotlib - vsconf matplotlibrc.template - vconf ${PKGDESTDIR}/usr/share/matplotlib/mpl-data/matplotlibrc - rm -f ${PKGDESTDIR}/usr/share/matplotlib/mpl-data/matplotlibrc + vmove "${py3_sitelib}/matplotlib/mpl-data" } }