aboutsummaryrefslogtreecommitdiffstats
path: root/main/py-munkres/APKBUILD
blob: f7197190aa171e03811fa287ee87c20f6a779b31 (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: Carlo Landmeter <clandmeter@gmail.com>
# Maintainer: Fabian Affolter <fabian@affolter-engineering.ch>
pkgname=py-munkres
_pkgname=munkres
pkgver=1.0.12
pkgrel=0
pkgdesc="Munkres algorithm for the assignment problem"
url="http://bmc.github.com/munkres/"
arch="noarch"
license="BSD"
depends=""
makedepends="python2-dev python3-dev py-setuptools"
subpackages="py2-${pkgname#py-}:_py2 py3-${pkgname#py-}:_py3"
source="https://github.com/bmc/munkres/archive/release-$pkgver.tar.gz#/$_pkgname-$pkgver.tar.gz"
builddir="$srcdir/$_pkgname-release-$pkgver"

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

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

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

_py3() {
	_py python3
}

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

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

sha512sums="9049fd350b739c9095b6e1da8fe0041210d4723ab8c0c6a7fc9943392bebf9eb224c6f420c8158a47607277e13fba2f3c7803ee222d58e8e3720d5647f44e596  munkres-1.0.12.tar.gz"