aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorprspkt <prspkt@protonmail.com>2018-04-06 20:38:24 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2018-07-17 20:08:04 +0000
commit7dda9d5902846976b9e2f3703c375c53158f8784 (patch)
tree17beaf69dcac0437b96202de1eda928c493ad324
parent11129e272f0f3444c50c55728255cb24c192e42d (diff)
downloadaports-7dda9d5902846976b9e2f3703c375c53158f8784.tar.bz2
aports-7dda9d5902846976b9e2f3703c375c53158f8784.tar.xz
testing/py-flask-qrcode: add python3
-rw-r--r--testing/py-flask-qrcode/APKBUILD29
1 files changed, 25 insertions, 4 deletions
diff --git a/testing/py-flask-qrcode/APKBUILD b/testing/py-flask-qrcode/APKBUILD
index c63472cc5b..b06f20c41f 100644
--- a/testing/py-flask-qrcode/APKBUILD
+++ b/testing/py-flask-qrcode/APKBUILD
@@ -8,11 +8,11 @@ pkgdesc="A simple flask extension to render QR codes on template"
url="https://github.com/marcoagner/Flask-QRcode"
arch="noarch"
license="BSD"
-depends="python2 py-flask py-qrcode"
+depends="py-flask py-qrcode"
depends_dev=""
-makedepends="python2-dev py-setuptools"
+makedepends="python2-dev python3-dev py-setuptools"
install=""
-subpackages=""
+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
@@ -29,11 +29,32 @@ prepare() {
build() {
cd "$_builddir"
python2 setup.py build || return 1
+ python3 setup.py build
}
package() {
+ mkdir -p "$pkgdir"
+}
+
+_py2() {
+ replaces="$pkgname"
+ depends="${depends//py-/py2-}"
+ _py python2
+}
+
+_py3() {
+ depends="${depends//py-/py3-}"
+ _py python3
+}
+
+_py() {
+ local python="$1"
+ pkgdesc="$pkgdesc (for $python)"
+ depends="$depends $python"
+ install_if="$pkgname=$pkgver-r$pkgrel $python"
+
cd "$_builddir"
- python2 setup.py install --prefix=/usr --root="$pkgdir" || return 1
+ $python setup.py install --prefix=/usr --root="$subpkgdir"
}
sha512sums="c70cdb75648e74697793fc9b34a54f87adab68efdffb7f00e759ebeb7bc9c20d20a90b50dc70a19661ea5e2c98d14d9825eb483a0e1aec05504b5958638307e5 Flask-QRcode-2.0.2.tar.gz"