New package: python-matplotlib-1.4.2

This commit is contained in:
Alessio Sergi 2015-01-27 19:17:00 +01:00
parent 168d5e2b57
commit 077b2860cb
23 changed files with 332 additions and 0 deletions

View file

@ -0,0 +1 @@
python-matplotlib

View file

@ -0,0 +1 @@
python-matplotlib

View file

@ -0,0 +1 @@
python-matplotlib

View file

@ -0,0 +1 @@
python-matplotlib

View file

@ -0,0 +1 @@
python-matplotlib

View file

@ -0,0 +1 @@
python-matplotlib

View file

@ -0,0 +1 @@
python-matplotlib

View file

@ -0,0 +1 @@
python-matplotlib

View file

@ -0,0 +1 @@
python-matplotlib

View file

@ -0,0 +1 @@
python-matplotlib

View file

@ -0,0 +1,22 @@
This is the base package which supports only non-GUI and non-interactive
graphics output. For interactive graphics install one of the following
packages:
- python-matplotlib-gtk (for GTK/GTKAgg/GTKCairo backend)
- python-matplotlib-gtk3 (for GTK3Agg/GTK3Cairo backend)
- python-matplotlib-qt4 (for Qt4Agg backend)
- python-matplotlib-qt5 (for Qt5Agg backend)
- python-matplotlib-tk (for TkAgg backend)
- python-matplotlib-web (for webagg backend)
- python-matplotlib-wx (for WX/WXAgg 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 python-Pillow
to support more file formats.
Matplotlibs LaTeX support requires a working LaTeX installation and
ghostscript.

View file

@ -0,0 +1,29 @@
Description: Fixes the path to search for matplotlibrc file
Forwarded: not-needed
Author: Sandro Tosi <morph@debian.org>
--- lib/matplotlib/__init__.py
+++ lib/matplotlib/__init__.py
@@ -653,10 +653,12 @@ def _get_data_path():
raise RuntimeError('Path in environment MATPLOTLIBDATA not a directory')
return path
- path = os.sep.join([os.path.dirname(__file__), 'mpl-data'])
+ path = '/usr/share/matplotlib/mpl-data'
if os.path.isdir(path):
return path
+ raise RuntimeError('Could not find the matplotlib data files')
+
# setuptools' namespace_packages may highjack this init file
# so need to try something known to be in matplotlib, not basemap
import matplotlib.afm
@@ -777,7 +779,7 @@ def matplotlib_fname():
home, '.matplotlib', 'matplotlibrc')
return fname
- path = get_data_path() # guaranteed to exist or raise
+ path = '/etc' # guaranteed to exist or raise
fname = os.path.join(path, 'matplotlibrc')
if not os.path.exists(fname):
warnings.warn('Could not find matplotlibrc; using defaults')

View file

@ -0,0 +1,20 @@
This is the base package which supports only non-GUI and non-interactive
graphics output. For interactive graphics install one of the following
packages:
- python3.4-matplotlib-gtk3 (for GTK3Agg/GTK3Cairo backend)
- python3.4-matplotlib-qt4 (for Qt4Agg backend)
- python3.4-matplotlib-qt5 (for Qt5Agg backend)
- python3.4-matplotlib-tk (for TkAgg backend)
- python3.4-matplotlib-web (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.4-Pillow
to support more file formats.
Matplotlibs LaTeX support requires a working LaTeX installation and
ghostscript.

View file

@ -0,0 +1,242 @@
# Template file for 'python-matplotlib'
pkgname=python-matplotlib
version=1.4.2
revision=1
wrksrc="matplotlib-${version}"
build_style=python-module
python_versions="2.7 3.4"
hostmakedepends="pkg-config python-setuptools python3.4-setuptools"
# XXX: use internal copy of agg and pycxx, highly patched
makedepends="
python-devel python3.4-devel python-numpy-devel python3.4-numpy-devel
python-six python3.4-six python-dateutil python3.4-dateutil python-pytz
python3.4-pytz python-tornado python3.4-tornado python-parsing
python3.4-parsing python-PyQt4-devel python-PyQt5-devel python-cairocffi
python3.4-cairocffi python-gobject-devel pygtk-devel gtk+3-devel tk-devel
python-tkinter python3.4-tkinter wxPython-devel freetype-devel libpng-devel
libqhull-devel"
depends="python-matplotlib-data>=${version}_${revision} python-numpy python-six
python-dateutil python-parsing python-pytz"
pycompile_module="matplotlib mpl_toolkits pylab.py"
short_desc="Python2 2D/3D plotting library"
_short_desc="${short_desc/Python2/Python3.4}"
maintainer="Alessio Sergi <al3hex@gmail.com>"
homepage="http://matplotlib.org/"
license="matplotlib, BSD, MIT"
distfiles="${PYPI_SITE}/m/matplotlib/matplotlib-${version}.tar.gz"
checksum=17a3c7154f152d8dfed1f37517c0a8c5db6ade4f6334f684989c36dab84ddb54
nocross=yes
export XDG_RUNTIME_DIR=/tmp
_pysitedir="usr/lib/python2.7/site-packages"
_py34sitedir="usr/lib/python3.4/site-packages"
pre_build() {
# set Agg as default backend
cat > setup.cfg <<-EOF
[rc_options]
backend = Agg
EOF
# remove shebangs
find . -type f -name '*.py' -exec sed -i "s,^#!.*python$,," {} +
# adjust path
sed -i 's,\(site-packages/matplotlib/mpl-data\),/etc,' matplotlibrc.template
}
post_install() {
# remove gtk and wx backends, not compatible with python3
rm -f ${DESTDIR}/${_py34sitedir}/matplotlib/backends/backend_{gdk,gtk,gtkagg,gtkcairo,wx,wxagg}.py
# do not install baseline_images, needed for tests only, but huge
rm -rf ${DESTDIR}/usr/lib/python*/site-packages/{matplotlib,mpl_toolkits}/tests/baseline_images
# remove data files
rm -rf ${DESTDIR}/usr/lib/python*/site-packages/matplotlib/{mpl-data,backends/Matplotlib.nib}
}
python-matplotlib-data_package() {
noarch=yes
conf_files="/etc/matplotlibrc"
short_desc+=" - data files"
pkg_install() {
vmkdir usr/share/matplotlib
vcopy ${wrksrc}/lib/matplotlib/mpl-data usr/share/matplotlib
vcopy ${wrksrc}/lib/matplotlib/backends/Matplotlib.nib usr/share/matplotlib
vsconf ${wrksrc}/matplotlibrc.template
vconf ${PKGDESTDIR}/usr/share/matplotlib/mpl-data/matplotlibrc
rm -f ${PKGDESTDIR}/usr/share/matplotlib/mpl-data/matplotlibrc
}
}
python-matplotlib-cairo_package() {
depends="${sourcepkg}>=${version}_${revision} python-cairocffi"
short_desc+=" - cairo backend"
pycompile_module="matplotlib"
pkg_install() {
vmove ${_pysitedir}/matplotlib/backends/backend_cairo.py
}
}
python-matplotlib-gtk_package() {
depends="${sourcepkg}-cairo>=${version}_${revision} pygtk"
short_desc+=" - GTK+ backend"
pycompile_module="matplotlib"
pkg_install() {
vmove ${_pysitedir}/matplotlib/backends/_backend_gdk.so
vmove ${_pysitedir}/matplotlib/backends/_gtkagg.so
vmove ${_pysitedir}/matplotlib/backends/backend_gdk.py
vmove ${_pysitedir}/matplotlib/backends/backend_gtk.py
vmove ${_pysitedir}/matplotlib/backends/backend_gtkagg.py
vmove ${_pysitedir}/matplotlib/backends/backend_gtkcairo.py
}
}
python-matplotlib-gtk3_package() {
depends="${sourcepkg}-cairo>=${version}_${revision}
gtk+3 gir-freedesktop python-gobject"
short_desc+=" - GTK+3 backend"
pycompile_module="matplotlib"
pkg_install() {
vmove ${_pysitedir}/matplotlib/backends/backend_gtk3.py
vmove ${_pysitedir}/matplotlib/backends/backend_gtk3agg.py
vmove ${_pysitedir}/matplotlib/backends/backend_gtk3cairo.py
}
}
# XXX: the Qt4 backend makes use of the Qt5 backend, which is actually a
# generic Qt backend. So we need to package all the Qt5 stuff in this generic
# package and provide a stub package which pulls in the python-PyQt5 dependency.
python-matplotlib-qtshared_package() {
depends="${sourcepkg}>=${version}_${revision}"
short_desc+=" - shared files for the Qt backends"
pycompile_module="matplotlib"
pkg_install() {
vmove ${_pysitedir}/matplotlib/backends/backend_qt5.py
vmove ${_pysitedir}/matplotlib/backends/backend_qt5agg.py
vmove ${_pysitedir}/matplotlib/backends/qt_compat.py
vmove ${_pysitedir}/matplotlib/backends/qt4_compat.py
vmove ${_pysitedir}/matplotlib/backends/qt_editor
}
}
python-matplotlib-qt4_package() {
depends="${sourcepkg}-qtshared>=${version}_${revision} python-PyQt4"
short_desc+=" - Qt4 backend"
pycompile_module="matplotlib"
pkg_install() {
vmove ${_pysitedir}/matplotlib/backends/backend_qt4.py
vmove ${_pysitedir}/matplotlib/backends/backend_qt4agg.py
}
}
python-matplotlib-qt5_package() {
depends="${sourcepkg}-qtshared>=${version}_${revision} python-PyQt5"
short_desc+=" - Qt5 backend"
pkg_install() {
:
}
}
python-matplotlib-tk_package() {
depends="${sourcepkg}>=${version}_${revision} python-tkinter"
short_desc+=" - Tk backend"
pycompile_module="matplotlib"
pkg_install() {
vmove ${_pysitedir}/matplotlib/backends/_tkagg.so
vmove ${_pysitedir}/matplotlib/backends/backend_tkagg.py
vmove ${_pysitedir}/matplotlib/backends/tkagg.py
}
}
python-matplotlib-web_package() {
depends="${sourcepkg}>=${version}_${revision} python-tornado"
short_desc+=" - web backend"
pkg_install() {
vmove ${_pysitedir}/matplotlib/backends/backend_webagg.py
vmove ${_pysitedir}/matplotlib/backends/backend_webagg_core.py
vmove ${_pysitedir}/matplotlib/backends/web_backend
}
}
python-matplotlib-wx_package() {
depends="${sourcepkg}>=${version}_${revision} wxPython"
short_desc+=" - wx backend"
pkg_install() {
vmove ${_pysitedir}/matplotlib/backends/backend_wx.py
vmove ${_pysitedir}/matplotlib/backends/backend_wxagg.py
}
}
python3.4-matplotlib_package() {
depends="python-matplotlib-data>=${version}_${revision} python3.4-numpy
python3.4-six python3.4-dateutil python3.4-parsing python3.4-pytz"
short_desc="${_short_desc}"
pycompile_version="3.4"
pycompile_module="matplotlib mpl_toolkits pylab.py"
pkg_install() {
vmove usr/lib/python3.4
}
}
python3.4-matplotlib-cairo_package() {
depends="python3.4-matplotlib>=${version}_${revision} python3.4-cairocffi"
short_desc="${_short_desc} - cairo backend"
pycompile_version="3.4"
pycompile_module="matplotlib"
pkg_install() {
vmove ${_py34sitedir}/matplotlib/backends/backend_cairo.py
}
}
python3.4-matplotlib-gtk3_package() {
depends="python3.4-matplotlib-cairo>=${version}_${revision}
gtk+3 gir-freedesktop python3.4-gobject"
short_desc="${_short_desc} - GTK+3 backend"
pycompile_version="3.4"
pycompile_module="matplotlib"
pkg_install() {
vmove ${_py34sitedir}/matplotlib/backends/backend_gtk3.py
vmove ${_py34sitedir}/matplotlib/backends/backend_gtk3agg.py
vmove ${_py34sitedir}/matplotlib/backends/backend_gtk3cairo.py
}
}
# XXX: the Qt4 backend makes use of the Qt5 backend, which is actually a
# generic Qt backend. So we need to package all the Qt5 stuff in this generic
# package and provide a stub package which pulls in the python3.x-PyQt5 dependency.
python3.4-matplotlib-qtshared_package() {
depends="python3.4-matplotlib>=${version}_${revision}"
short_desc="${_short_desc} - shared files for the Qt backends"
pycompile_version="3.4"
pycompile_module="matplotlib"
pkg_install() {
vmove ${_py34sitedir}/matplotlib/backends/backend_qt5.py
vmove ${_py34sitedir}/matplotlib/backends/backend_qt5agg.py
vmove ${_py34sitedir}/matplotlib/backends/qt_compat.py
vmove ${_py34sitedir}/matplotlib/backends/qt4_compat.py
vmove ${_py34sitedir}/matplotlib/backends/qt_editor
}
}
python3.4-matplotlib-qt4_package() {
depends="python3.4-matplotlib-qtshared>=${version}_${revision} python3.4-PyQt4"
short_desc="${_short_desc} - Qt4 backend"
pycompile_version="3.4"
pycompile_module="matplotlib"
pkg_install() {
vmove ${_py34sitedir}/matplotlib/backends/backend_qt4.py
vmove ${_py34sitedir}/matplotlib/backends/backend_qt4agg.py
}
}
python3.4-matplotlib-qt5_package() {
depends="python3.4-matplotlib-qtshared>=${version}_${revision} python3.4-PyQt5"
short_desc="${_short_desc} - Qt5 backend"
pkg_install() {
:
}
}
python3.4-matplotlib-tk_package() {
depends="python3.4-matplotlib>=${version}_${revision} python3.4-tkinter"
short_desc="${_short_desc} - Tk backend"
pycompile_version="3.4"
pycompile_module="matplotlib"
pkg_install() {
vmove ${_py34sitedir}/matplotlib/backends/_tkagg.cpython-34m.so
vmove ${_py34sitedir}/matplotlib/backends/backend_tkagg.py
vmove ${_py34sitedir}/matplotlib/backends/tkagg.py
}
}
python3.4-matplotlib-web_package() {
depends="python3.4-matplotlib>=${version}_${revision} python3.4-tornado"
short_desc="${_short_desc} - web backend"
pycompile_version="3.4"
pycompile_module="matplotlib"
pkg_install() {
vmove ${_py34sitedir}/matplotlib/backends/backend_webagg.py
vmove ${_py34sitedir}/matplotlib/backends/backend_webagg_core.py
vmove ${_py34sitedir}/matplotlib/backends/web_backend
}
}

View file

@ -0,0 +1 @@
python-matplotlib

View file

@ -0,0 +1 @@
python-matplotlib

View file

@ -0,0 +1 @@
python-matplotlib

View file

@ -0,0 +1 @@
python-matplotlib

View file

@ -0,0 +1 @@
python-matplotlib

View file

@ -0,0 +1 @@
python-matplotlib

View file

@ -0,0 +1 @@
python-matplotlib

View file

@ -0,0 +1 @@
python-matplotlib

View file

@ -0,0 +1 @@
python-matplotlib