diff options
author | prspkt <prspkt@protonmail.com> | 2018-04-06 20:13:53 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2018-07-17 20:08:04 +0000 |
commit | 870c6826e21d2fa79f4dbda36f8b768aebdb6723 (patch) | |
tree | 8a0c2dff990ff163adbf9b9b938d4354711b7cd3 /testing/py-qrcode | |
parent | b1132eaefa4ed348de66017aef921f09bfc0889a (diff) | |
download | aports-870c6826e21d2fa79f4dbda36f8b768aebdb6723.tar.bz2 aports-870c6826e21d2fa79f4dbda36f8b768aebdb6723.tar.xz |
testing/py-qrcode: add python3
Diffstat (limited to 'testing/py-qrcode')
-rw-r--r-- | testing/py-qrcode/APKBUILD | 31 |
1 files changed, 27 insertions, 4 deletions
diff --git a/testing/py-qrcode/APKBUILD b/testing/py-qrcode/APKBUILD index 62cd483b46..4d132677d3 100644 --- a/testing/py-qrcode/APKBUILD +++ b/testing/py-qrcode/APKBUILD @@ -8,21 +8,44 @@ pkgdesc="A QR code image generator" url="https://github.com/lincolnloop/python-qrcode" arch="noarch" license="BSD" -depends="python2 py-pillow py2-six" -makedepends="python2-dev py-setuptools" +depends="py-pillow py-six" +makedepends="python2-dev python3-dev py-setuptools" options="!check" -subpackages="$pkgname-doc" +subpackages="py2-${pkgname#py-}:_py2 py3-${pkgname#py-}:_py3 $pkgname-doc" source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz" builddir="$srcdir/$_pkgname-$pkgver" build() { cd "$builddir" python2 setup.py build + python3 setup.py build } package() { + install -D -m644 "$builddir"/doc/qr.1 \ + "$pkgdir"/usr/share/man/man1/qr.1 +} + +_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" + $python setup.py install --prefix=/usr --root="$subpkgdir" + rm -rf "$subpkgdir"/usr/share } sha512sums="c43f12fe6b12d244d19a994cfd20adbe3776bbda1459c9dbc6164b1c9e7637f05e2acc1c2d29b82243024a4ea9b46c319a56acdf6d05e7b697bcd2c31c02102e qrcode-6.0.tar.gz" |