aboutsummaryrefslogtreecommitdiffstats
path: root/testing/py-matplotlib/APKBUILD
blob: 2033d0abdfaeb56f396963d4d035db9585c28ebf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# Contributor: Isaac Dunham <ibid.ag@gmail.com>
# Maintainer: Isaac Dunham <ibid.ag@gmail.com>
pkgname=py-matplotlib
pkgver=1.3.1
pkgrel=1
pkgdesc="A Python library for plots"
url="http://matplotlib.org"
arch="all"
license="custom"
depends="python py-numpy py-tkinter py-dateutil py-parsing"
depends_dev=""
makedepends="$depends python-dev gfortran py-numpy-dev freetype-dev
	libpng-dev tk-dev py-setuptools"
install=""
subpackages="$pkgname-doc $pkgname-tests"
source="matplotlib-$pkgver.tar.gz::https://github.com/matplotlib/matplotlib/archive/v$pkgver.tar.gz"

_builddir="$srcdir"/matplotlib-$pkgver
prepare() {
	local i
	cd "$_builddir"
	for i in $source; do
		case $i in
		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
		esac
	done
}

build() {
	cd "$_builddir"
	python setup.py build || return 1
}

package() {
	cd "$_builddir"
	python setup.py install --prefix=/usr --root="$pkgdir" || return 1
	install -m755 -d "$pkgdir"/usr/share/licenses/custom/$pkgname
	install -m644 LICENSE/* "$pkgdir"/usr/share/licenses/custom/$pkgname/
}

tests() {
	pkgdesc="Tests for matplotlib"
	arch="noarch"
	depends="$depends py-nose"
	cd "$pkgdir"/usr/lib || return 1
	export _pysub="`ls`" && test -n "$_pysub" || return 1
	mkdir -p "$subpkgdir"/usr/lib/"$_pysub"/site-packages/matplotlib \
	|| return 1
	mv "$_pysub"/site-packages/matplotlib/tests \
	"$subpkgdir"/usr/lib/"$_pysub"/site-packages/matplotlib \
	|| return 1

}

md5sums="d90d1f84140fc924ecb8f8610affd665  matplotlib-1.3.1.tar.gz"
sha256sums="144125c941f72d900fcd2d1d676bfd47c9043af74ed62b87341dc12a55ec1454  matplotlib-1.3.1.tar.gz"
sha512sums="f178e61f2133078daec2cd7bc05411a26da36121607a72115a991052dd002c72daaf8a7a60513b861ac50aabf0524db155cd748925abae23e2311a98b704ee2b  matplotlib-1.3.1.tar.gz"