aboutsummaryrefslogtreecommitdiffstats
path: root/testing/py-sortedcontainers/APKBUILD
blob: 3761786d9fd74109b2c9e0ab118318f1ef0e5b84 (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
# Contributor: André Klitzing <aklitzing@gmail.com>
# Maintainer: André Klitzing <aklitzing@gmail.com>
pkgname=py-sortedcontainers
_pkgname=sortedcontainers
pkgver=1.5.10
pkgrel=0
pkgdesc="Python Sorted Container Types: SortedList, SortedDict, and SortedSet"
url="http://www.grantjenks.com/docs/sortedcontainers/"
arch="noarch"
license="Apache"
makedepends="python2-dev py-setuptools python3-dev"
subpackages="py3-${pkgname#py-}:_py3 py2-${pkgname#py-}:_py2"
options="!check"
source="$_pkgname-$pkgver.tar.gz::https://github.com/grantjenks/sorted_containers/archive/v$pkgver.tar.gz"
builddir="$srcdir/sorted_containers-$pkgver"

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

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

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

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

_py2() {
	replaces="$pkgname"
	_py python2
}

_py3() {
	_py python3
}

sha512sums="22ec92d9d7dc44159f47be9b028cc468637cae68d4702fff87e8531a155d56bb031b32c77efcc6f839ead19d27471cb80660fe990b3d424ed1fe58178ee803b8  sortedcontainers-1.5.10.tar.gz"