aboutsummaryrefslogtreecommitdiffstats
path: root/main/py-django-tables2/APKBUILD
blob: c36f43b96e4a37dda8123e5c242c977c77022bd3 (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.21.2
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="9af04144e2928cd0246bc7406064ec959b7eddb1d29f013ca53cd6244df07b07a2abe0e4a79b05c572bc164ceb475c954e3f84eea6b53c631c5f958f25aece62  django-tables2-1.21.2.tar.gz"