summaryrefslogtreecommitdiff
path: root/community/python-matplotlib
diff options
context:
space:
mode:
authorroot <root@rshg054.dnsready.net>2012-11-10 01:23:31 -0800
committerroot <root@rshg054.dnsready.net>2012-11-10 01:23:31 -0800
commit6eea0bd1e92ed5aa53cb5f59102529c88e9e1786 (patch)
treeb069468f4084f5af5ad3ba2ecab7e6b4deb90267 /community/python-matplotlib
parent3f7cb62ef558ea147661abe007a4293c0069fc62 (diff)
Sat Nov 10 01:23:30 PST 2012
Diffstat (limited to 'community/python-matplotlib')
-rw-r--r--community/python-matplotlib/PKGBUILD74
-rw-r--r--community/python-matplotlib/setup.cfg83
2 files changed, 157 insertions, 0 deletions
diff --git a/community/python-matplotlib/PKGBUILD b/community/python-matplotlib/PKGBUILD
new file mode 100644
index 000000000..8f6b37ea6
--- /dev/null
+++ b/community/python-matplotlib/PKGBUILD
@@ -0,0 +1,74 @@
+# $Id: PKGBUILD 79647 2012-11-10 00:59:34Z stephane $
+# Maintainer: Stéphane Gaudreault <stephane@archlinux.org>
+# Contributor: Stefan Husmann <stefan-husmann@t-online.de>
+# Contributor: Angel 'angvp' Velasquez <angvp[at]archlinux.com.ve>
+# Contributor: Douglas Soares de Andrade <dsa@aur.archlinux.org>
+
+pkgbase=python-matplotlib
+pkgname=('python2-matplotlib' 'python-matplotlib')
+pkgver=1.2.0
+pkgrel=2
+pkgdesc="A python plotting library, making publication quality plots"
+arch=('i686' 'x86_64')
+url="http://matplotlib.sourceforge.net/"
+license=('custom')
+backup=(usr/lib/python2.7/site-packages/matplotlib/mpl-data/matplotlibrc)
+makedepends=('python2-pytz' 'python2-numpy' 'python2-pyqt'
+ 'python-pytz' 'python-numpy' 'pyqt')
+source=("https://github.com/downloads/matplotlib/matplotlib/matplotlib-${pkgver}.tar.gz"
+ setup.cfg)
+sha1sums=('1d0c319b2bc545f1a7002f56768e5730fe573518'
+ '370a08120bcb3046f590c527b3d29d18ae874818')
+
+build() {
+ cd "${srcdir}"/matplotlib-${pkgver}
+
+ # use system python-six
+ rm lib/six.py
+
+ cp ../setup.cfg .
+
+ # For numpy 1.7
+ sed -i '/include/s/numpy\/arrayobject.h/numpy\/oldnumeric.h/g' \
+ src/*.{c,cpp,h} lib/matplotlib/delaunay/*.{cpp,h} lib/matplotlib/tri/*.h
+
+ cd ..
+ cp -a matplotlib-${pkgver} matplotlib-${pkgver}-py3
+
+ # Build python2
+ cd matplotlib-${pkgver}
+ for file in $(find . -name '*.py' -print); do
+ sed -i -e "s|^#!.*/usr/bin/python|#!/usr/bin/python2|" \
+ -e "s|^#!.*/usr/bin/env *python|#!/usr/bin/env python2|" ${file}
+ done
+
+ python2 setup.py build
+
+ # Build python3
+ cd ../matplotlib-${pkgver}-py3
+ for file in $(find . -name '*.py' -print); do
+ sed -i -e "s|^#!.*/usr/bin/python|#!/usr/bin/python3|" \
+ -e "s|^#!.*/usr/bin/env *python|#!/usr/bin/env python3|" ${file}
+ done
+
+ python3 setup.py build
+}
+
+package_python2-matplotlib() {
+ depends=('python2-pytz' 'python2-numpy' 'python2-pyqt' 'python2-dateutil')
+
+ cd "${srcdir}"/matplotlib-${pkgver}
+ python2 setup.py install -O1 --skip-build --root "${pkgdir}" --prefix=/usr
+
+ install -dm755 "${pkgdir}"/usr/share/licenses/python2-matplotlib
+ install -m 644 doc/users/license.rst "${pkgdir}"/usr/share/licenses/python2-matplotlib
+}
+
+package_python-matplotlib() {
+ depends=('python-pytz' 'python-numpy' 'pyqt' 'python-dateutil')
+ cd "${srcdir}"/matplotlib-${pkgver}-py3
+ python3 setup.py install -O1 --skip-build --root "${pkgdir}" --prefix=/usr
+
+ install -dm755 "${pkgdir}"/usr/share/licenses/python-matplotlib
+ install -m 644 doc/users/license.rst "${pkgdir}"/usr/share/licenses/python-matplotlib
+}
diff --git a/community/python-matplotlib/setup.cfg b/community/python-matplotlib/setup.cfg
new file mode 100644
index 000000000..bed844776
--- /dev/null
+++ b/community/python-matplotlib/setup.cfg
@@ -0,0 +1,83 @@
+# Rename this file to setup.cfg to modify matplotlib's
+# build options.
+
+[egg_info]
+tag_svn_revision = 1
+
+[directories]
+# Uncomment to override the default basedir in setupext.py.
+# This can be a single directory or a space-delimited list of directories.
+#basedirlist = /usr
+
+[status]
+# To suppress display of the dependencies and their versions
+# at the top of the build log, uncomment the following line:
+#suppress = True
+#
+# Uncomment to insert lots of diagnostic prints in extension code
+#verbose = True
+
+[provide_packages]
+# By default, matplotlib checks for a few dependencies and
+# installs them if missing. This feature can be turned off
+# by uncommenting the following lines. Acceptible values are:
+# True: install, overwrite an existing installation
+# False: do not install
+# auto: install only if the package is unavailable. This
+# is the default behavior
+#
+## Date/timezone support:
+#pytz = False
+dateutil = False
+
+[gui_support]
+# Matplotlib supports multiple GUI toolkits, including Cocoa,
+# GTK, Fltk, MacOSX, Qt, Qt4, Tk, and WX. Support for many of
+# these toolkits requires AGG, the Anti-Grain Geometry library,
+# which is provided by matplotlib and built by default.
+#
+# Some backends are written in pure Python, and others require
+# extension code to be compiled. By default, matplotlib checks
+# for these GUI toolkits during installation and, if present,
+# compiles the required extensions to support the toolkit. GTK
+# support requires the GTK runtime environment and PyGTK. Wx
+# support requires wxWidgets and wxPython. Tk support requires
+# Tk and Tkinter. The other GUI toolkits do not require any
+# extension code, and can be used as long as the libraries are
+# installed on your system.
+#
+# You can uncomment any the following lines if you know you do
+# not want to use the GUI toolkit. Acceptible values are:
+# True: build the extension. Exits with a warning if the
+# required dependencies are not available
+# False: do not build the extension
+# auto: build if the required dependencies are available,
+# otherwise skip silently. This is the default
+# behavior
+#
+gtk = False
+gtkagg = False
+tkagg = False
+wxagg = False
+macosx = False
+
+[rc_options]
+# User-configurable options
+#
+# Default backend, one of: Agg, Cairo, CocoaAgg, GTK, GTKAgg, GTKCairo,
+# FltkAgg, MacOSX, Pdf, Ps, QtAgg, Qt4Agg, SVG, TkAgg, WX, WXAgg.
+#
+# The Agg, Ps, Pdf and SVG backends do not require external
+# dependencies. Do not choose GTK, GTKAgg, GTKCairo, MacOSX, TkAgg or WXAgg
+# if you have disabled the relevent extension modules. Agg will be used
+# by default.
+#
+backend = Qt4Agg
+#
+# The numerix module was historically used to provide
+# compatibility between the Numeric, numarray, and NumPy array
+# packages. Now that NumPy has emerge as the universal array
+# package for python, numerix is not really necessary and is
+# maintained to provide backward compatibility. Do not change
+# this unless you have a compelling reason to do so.
+numerix = numpy