aboutsummaryrefslogtreecommitdiffstats
path: root/testing/py-frozendict/APKBUILD
blob: 145f75062a2916d001a588398bd563061b2341a6 (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
# Contributor: Daiki Maekawa <daikimaekawa29@gmail.com>
# Maintainer: Daiki Maekawa <daikimaekawa29@gmail.com>
pkgname=py-frozendict
pkgver=1.2
pkgrel=1
pkgdesc="immutable dictionary"
url="https://github.com/slezica/python-frozendict"
arch="all"
license="MIT"
makedepends="python2-dev python3-dev py-setuptools"
subpackages="py2-${pkgname#py-}:_py2 py3-${pkgname#py-}:_py3"
source="https://files.pythonhosted.org/packages/4e/55/a12ded2c426a4d2bee73f88304c9c08ebbdbadb82569ebdd6a0c007cfd08/frozendict-${pkgver}.tar.gz"
builddir="$srcdir/frozendict-${pkgver}"

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

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

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

_py2() {
	_py python2
}

_py3() {
	_py python3
}

_py() {
	local python="$1"
	pkgdesc="$pkgdesc (for $python)"
	install_if="$pkgname=$pkgver-$pkgrel $python"
	
	cd "$builddir"
	$python setup.py install --prefix=/usr --root="$subpkgdir"
}
sha512sums="095cf5f6f8b02bf5666e04200431992bf4b3160aae3464d528bc256b1ab643e29dda78fe94d9e8c983dbfe66cd2459e0559122e17b6b8660c0552adc5318b3da  frozendict-1.2.tar.gz"