aboutsummaryrefslogtreecommitdiffstats
path: root/testing/py-banknumber/APKBUILD
diff options
context:
space:
mode:
authorFabian Affolter <fabian@affolter-engineering.ch>2016-11-07 18:41:47 +0000
committerTimo Teräs <timo.teras@iki.fi>2016-12-27 10:02:29 +0200
commit68e314eebd429c4bc2145efcba20d7814b8641b0 (patch)
tree22bab1853ca02042e94734a5da244c6981252f9d /testing/py-banknumber/APKBUILD
parent6f61d3c5e970f93c4ca6f59f3b2864373aee6584 (diff)
downloadaports-68e314eebd429c4bc2145efcba20d7814b8641b0.tar.bz2
aports-68e314eebd429c4bc2145efcba20d7814b8641b0.tar.xz
testing/py-banknumber: upgrade to 2.0 and enable py3
Diffstat (limited to 'testing/py-banknumber/APKBUILD')
-rw-r--r--testing/py-banknumber/APKBUILD52
1 files changed, 29 insertions, 23 deletions
diff --git a/testing/py-banknumber/APKBUILD b/testing/py-banknumber/APKBUILD
index 1a7e68aaaa..00a433b391 100644
--- a/testing/py-banknumber/APKBUILD
+++ b/testing/py-banknumber/APKBUILD
@@ -2,40 +2,46 @@
# Maintainer: Fabian Affolter <fabian@affolter-engineering.ch>
pkgname=py-banknumber
_pkgname=banknumber
-pkgver=1.0
+pkgver=2.0
pkgrel=0
pkgdesc="A Python module to validate Bank codes"
url="https://bitbucket.org/zikzakmedia/python-banknumber"
arch="noarch"
license="GPL3+"
-depends="python2"
-depends_dev=""
-makedepends="python2-dev py-setuptools"
-install=""
-subpackages=""
+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
-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
-}
+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="0c77231623040ded7624b00d8ebb68f1 banknumber-1.0.tar.gz"
-sha256sums="57b4c7a9e0d6edd050f54bae6b4f7c6cc106149a9705cd450acae0b4236583ec banknumber-1.0.tar.gz"
-sha512sums="152f12a21a3488d11df01d771588800bc04f8ccd831747bff6b8769579614386c4e7560f5739821ed1ce8a0c0d0055bdc176ca1a673bde1bcba8ce745e360cd0 banknumber-1.0.tar.gz"
+md5sums="821c566e98849cbe4d57fe4b855bf41d banknumber-2.0.tar.gz"
+sha256sums="6356518668756622deb69e7cea2e234860ae37b09051d42851c6ee7938fb31a5 banknumber-2.0.tar.gz"
+sha512sums="78eb4911483a2cf54f5f2c5dd0b023483b9b14fc630c1a93238145491f79de31d3213dbee2838dd36643f4adca89136bda1a104b89710a7292aa497f511bb25d banknumber-2.0.tar.gz"