diff options
Diffstat (limited to 'community/python2-matplotlib')
-rw-r--r-- | community/python2-matplotlib/PKGBUILD | 52 | ||||
-rw-r--r-- | community/python2-matplotlib/setup.cfg | 83 |
2 files changed, 135 insertions, 0 deletions
diff --git a/community/python2-matplotlib/PKGBUILD b/community/python2-matplotlib/PKGBUILD new file mode 100644 index 000000000..7f19554c5 --- /dev/null +++ b/community/python2-matplotlib/PKGBUILD @@ -0,0 +1,52 @@ +# $Id: PKGBUILD 40554 2011-02-25 11:55:09Z 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> + +pkgname=python2-matplotlib +pkgver=1.0.1 +pkgrel=2 +pkgdesc="A python plotting library, making publication quality plots" +arch=('i686' 'x86_64') +url="http://matplotlib.sourceforge.net/" +backup=(usr/lib/python2.7/site-packages/matplotlib/mpl-data/matplotlibrc) +depends=('python-dateutil' 'python2-pytz' 'python2-numpy' 'python2-pyparsing' 'python2-qt') +optdepends=('pygtk: for use with the GTK or GTKAgg backend' + 'tk: used by the TkAgg backend' + 'wxpython: for use with the WXAgg backend') +makedepends=('pygtk' 'tk' 'wxpython') +provides=('matplotlib' "python-matplotlib=${pkgver}") +replaces=('python-matplotlib') +conflicts=('python-matplotlib') +source=("http://downloads.sourceforge.net/matplotlib/matplotlib-${pkgver}.tar.gz" + setup.cfg) +sha1sums=('c7a832f28a66817626e7a8af21e14ea0e15f4008' + 'bcb5a83db9d95c96a57ca518fa6bd1897b23558f') +license=('custom') + +build() { + cd "${srcdir}/matplotlib-${pkgver}" + + cp ../setup.cfg . + + # remove internal copy of pyparsing + rm lib/matplotlib/pyparsing.py + sed -i "s/matplotlib.pyparsing/pyparsing/g" lib/matplotlib/{mathtext,fontconfig_pattern}.py + + # python2 fix + 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 +} + +package() { + cd "${srcdir}/matplotlib-${pkgver}" + python2 setup.py install -O1 --skip-build --root "${pkgdir}" --prefix=/usr + + install -dm755 "${pkgdir}/usr/share/licenses/${pkgname}" + mv license "${pkgdir}/usr/share/licenses/${pkgname}" +} diff --git a/community/python2-matplotlib/setup.cfg b/community/python2-matplotlib/setup.cfg new file mode 100644 index 000000000..4b82986e9 --- /dev/null +++ b/community/python2-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 = True +gtkagg = True +tkagg = True +wxagg = True +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 |