aboutsummaryrefslogtreecommitdiffstats
path: root/testing/py-flask-qrcode
diff options
context:
space:
mode:
Diffstat (limited to 'testing/py-flask-qrcode')
-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"