aboutsummaryrefslogtreecommitdiffstats
path: root/testing/py-tabulate/APKBUILD
blob: c5d4b272f9d6a379cf44687d769ab0748f81d552 (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
# Maintainer: Andy Postnikov <apostnikov@gmail.com>
pkgname=py-tabulate
pkgver=0.8.2
pkgrel=0
pkgdesc="Pretty-print tabular data"
url="https://bitbucket.org/astanin/python-tabulate"
arch="noarch"
license="MIT"
makedepends="python2-dev python3-dev"
checkdepends="pytest py-nose"
subpackages="py2-${pkgname#py-}:_py2 py3-${pkgname#py-}:_py3"
source="https://files.pythonhosted.org/packages/source/t/tabulate/tabulate-$pkgver.tar.gz"
builddir="$srcdir/${pkgname#py-}-$pkgver"

build() {
	cd "$builddir"
	python2 setup.py build
	python3 setup.py build
}

check() {
	cd "$builddir"
	python2 setup.py check
	python3 setup.py check
	python2 setup.py test
	python3 setup.py test
}

package() {
	cd "$builddir"
	mkdir -p "$pkgdir"
}

_py2() {
	depends="${depends//py-/py2-}"
	_py python2
}

_py3() {
	depends="${depends//py-/py3-}"
	_py python3
}

_py() {
	local python="$1"
	pkgdesc="$pkgdesc (for $python)"
	depends="$depends $python"
	install_if="$pkgname=$pkgver-r$pkgrel $python"

	cd "$builddir"
	$python setup.py install --prefix=/usr --root="$subpkgdir"
}

sha512sums="9e34fb84e16f4b2c1378c0f53c5ef803438fcae7bc1637ac8975f358a11653f641bba0ea19529858e8e62aa45bb5bccd3b6f0492fd2d9d9c9a3bf963dd1ac0a7  tabulate-0.8.2.tar.gz"