mirror of
https://github.com/void-linux/void-packages.git
synced 2025-04-16 14:17:02 +02:00
python3-matplotlib: update to 3.2.1
Switch to upstream enforced data location
This commit is contained in:
parent
b9029e1183
commit
71d918cc7b
4 changed files with 23 additions and 58 deletions
|
@ -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
|
||||
|
|
16
srcpkgs/python3-matplotlib/files/README.voidlinux
Normal file
16
srcpkgs/python3-matplotlib/files/README.voidlinux
Normal file
|
@ -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.
|
|
@ -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):
|
|
@ -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 <al3hex@gmail.com>"
|
|||
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"
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue