aboutsummaryrefslogtreecommitdiffstats
path: root/testing/py-sortedcontainers/APKBUILD
blob: 9cc312378a145fcc9fc6d7336e69da5a19c5657d (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.7
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="9b6aef9c95c5543e06e7ee8bd89f86de7ce8f5b518663256113fdbbbd5a9f800c2e9f0ad993acc497f78ae665dd8473369912b3780df565403aee1c519b72814  sortedcontainers-1.5.7.tar.gz"