aboutsummaryrefslogtreecommitdiffstats
path: root/main/py-django-tables2/APKBUILD
blob: 094e62d63ec8e52d3cf76e74eda510ac606948a6 (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
# Contributor: Kaarle Ritvanen <kaarle.ritvanen@datakunkku.fi>
# Maintainer: Kaarle Ritvanen <kaarle.ritvanen@datakunkku.fi>
pkgname=py-django-tables2
pkgver=1.19.0
pkgrel=0
pkgdesc="Table/data-grid framework for Django"
url=https://github.com/bradleyayers/django-tables2/
arch=noarch
license=BSD
depends="py-django py-six"
makedepends="py-setuptools"
subpackages="py2-${pkgname#py-}:_py2 py3-${pkgname#py-}:_py3"
options="!check" #no testsuite
source="https://files.pythonhosted.org/packages/source/d/django-tables2/django-tables2-$pkgver.tar.gz"
builddir="$srcdir"/django-tables2-$pkgver

build() {
	cd "$_builddir"
	python2 setup.py --quiet build
	python3 setup.py --quiet build
}

package() {
	cd "$_builddir"
	mkdir -p "$pkgdir"/usr/bin
}

_py2() {
	depends="${depends//py-/py2-}"
	replaces=$pkgname
	provides="$pkgname-r$pkgver"
	_py python2
}

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

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

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


sha512sums="b6edab85304021f2d7766f3d4e7b6035056102eb69b5adada7ea081a5b906a3a488975131df0953f57403d9a2a91e36218be0b9ba572186745098a2b52e6a5b6  django-tables2-1.19.0.tar.gz"