aboutsummaryrefslogtreecommitdiffstats
path: root/community/py-argh
diff options
context:
space:
mode:
authorprspkt <prspkt@protonmail.com>2018-05-19 19:32:59 +0000
committerRoberto Oliveira <robertoguimaraes8@gmail.com>2018-07-24 07:36:10 +0000
commitee7d0929b9e5f48a1739e82797526682d7940a97 (patch)
tree08f3585888acb30fb3b85616ab39634c11886168 /community/py-argh
parentfa852bb69460bc230cfaa36dcb49e7f90da5aa5d (diff)
commmunity/py-argh: add python3
Diffstat (limited to 'community/py-argh')
-rw-r--r--community/py-argh/APKBUILD32
1 files changed, 26 insertions, 6 deletions
diff --git a/community/py-argh/APKBUILD b/community/py-argh/APKBUILD
index 90a42df6977..3898428f2c6 100644
--- a/community/py-argh/APKBUILD
+++ b/community/py-argh/APKBUILD
@@ -3,16 +3,16 @@
pkgname=py-argh
_pkgname=argh
pkgver=0.26.2
-pkgrel=1
+pkgrel=2
pkgdesc="A Python argparse wrapper"
-url="https://github.com/neithere/argh/"
+url="https://github.com/neithere/argh"
arch="noarch"
license="LGPL-3.0-or-later"
-depends="python2"
+depends=""
depends_dev=""
-makedepends="python2-dev py-setuptools"
+makedepends="py-setuptools python2-dev python3-dev"
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"
@@ -20,16 +20,36 @@ builddir="$srcdir/$_pkgname-$pkgver"
build() {
cd "$builddir"
python2 setup.py build
+ python3 setup.py build
}
check() {
cd "$builddir"
python2 setup.py test
+ python3 setup.py test
}
package() {
+ 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"
- python2 setup.py install --prefix=/usr --root="$pkgdir"
+ $python setup.py install --prefix=/usr --root="$subpkgdir"
}
sha512sums="90382900d5cec9629dacb4459a2c9491d1425b66fa3f90d7cbf511dec846a99dbb9424f3e08f0c006da48fbf9c067078705be70b314700541fd800630e4b1707 argh-0.26.2.tar.gz"