aboutsummaryrefslogtreecommitdiffstats
path: root/main/py-munkres/APKBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'main/py-munkres/APKBUILD')
-rw-r--r--main/py-munkres/APKBUILD58
1 files changed, 33 insertions, 25 deletions
diff --git a/main/py-munkres/APKBUILD b/main/py-munkres/APKBUILD
index 292d211b8d..9f8468746a 100644
--- a/main/py-munkres/APKBUILD
+++ b/main/py-munkres/APKBUILD
@@ -1,40 +1,48 @@
# Contributor: Carlo Landmeter <clandmeter@gmail.com>
-# Maintainer:
+# Maintainer: Fabian Affolter <fabian@affolter-engineering.ch>
pkgname=py-munkres
-pkgver=1.0.7
+_pkgname=munkres
+pkgver=1.0.8
pkgrel=0
pkgdesc="Munkres algorithm for the assignment problem"
url="http://bmc.github.com/munkres/"
arch="noarch"
license="BSD"
-depends="python2"
-depends_dev=""
-makedepends="python2-dev"
-install=""
-subpackages=""
-source="https://files.pythonhosted.org/packages/source/m/munkres/munkres-$pkgver.tar.gz"
-
-_builddir="$srcdir"/munkres-$pkgver
-prepare() {
- local i
- cd "$_builddir"
- for i in $source; do
- case $i in
- *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
- esac
- done
-}
+depends=""
+makedepends="python2-dev python3-dev py-setuptools"
+subpackages="py2-${pkgname#py-}:_py2 py3-${pkgname#py-}:_py3"
+source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz"
+builddir="$srcdir/$_pkgname-$pkgver"
build() {
- cd "$_builddir"
+ cd "$builddir"
python2 setup.py build || return 1
+ python3 setup.py build || return 1
}
package() {
- cd "$_builddir"
- python2 setup.py install --prefix=/usr --root="$pkgdir" || return 1
+ 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"
}
-md5sums="d534612326f7c7cadcfa61d109f96289 munkres-1.0.7.tar.gz"
-sha256sums="334a5d849bcefed3e4c32ecfbca4ee8dfc8ef5f2f181334d6f7f4e100b71d6c4 munkres-1.0.7.tar.gz"
-sha512sums="8618875f3aeb53fbd506bfb6de185876235c0efb33853ac9a08e4d528a4d9a7ccfa7c3eb8585dfd181b264d2456c98015e75cb36c374d51621176ca696cd3e37 munkres-1.0.7.tar.gz"
+md5sums="8e93108d2cb0e532aabd5dc9e418328c munkres-1.0.8.tar.gz"
+sha256sums="185f1a9c4d2c31f2f19afa48bc2ec726c11e945eded4784d272da2fd49bf7a55 munkres-1.0.8.tar.gz"
+sha512sums="e0afda8b91e51d177b9e2dc66ccacce849649d1a7d0e756884ac030acf4080076aa428182c5e9366613ee16db338ba7dcd3c38977de0888781b1885f08cb8236 munkres-1.0.8.tar.gz"