aboutsummaryrefslogtreecommitdiffstats
path: root/testing
diff options
context:
space:
mode:
authorprspkt <prspkt@protonmail.com>2018-06-30 20:01:15 +0300
committerRoberto Oliveira <robertoguimaraes8@gmail.com>2018-07-04 07:55:19 +0000
commit8df033fe59fb64b8e47f3bd3c088a0e1432dab31 (patch)
tree413432b1b95dc75dbac862857302a20f9fb3bd34 /testing
parentd7da932f5878aa43e1f540087a41f28ec056ed8f (diff)
downloadaports-8df033fe59fb64b8e47f3bd3c088a0e1432dab31.tar.bz2
aports-8df033fe59fb64b8e47f3bd3c088a0e1432dab31.tar.xz
testing/py-blessings: add python3
Diffstat (limited to 'testing')
-rw-r--r--testing/py-blessings/APKBUILD30
1 files changed, 25 insertions, 5 deletions
diff --git a/testing/py-blessings/APKBUILD b/testing/py-blessings/APKBUILD
index 3b5c5b8598..864f077ce5 100644
--- a/testing/py-blessings/APKBUILD
+++ b/testing/py-blessings/APKBUILD
@@ -3,13 +3,14 @@
pkgname=py-blessings
_pkgname=blessings
pkgver=1.7
-pkgrel=0
-pkgdesc="A Python wrapper around terminal coloring, styling and positioning"
+pkgrel=1
+pkgdesc="Wrapper around terminal coloring, styling and positioning"
url="https://github.com/erikrose/blessings"
arch="noarch"
license="MIT"
-depends="python2"
-makedepends="python2-dev py-setuptools"
+depends=""
+makedepends="py-setuptools python2-dev python3-dev"
+subpackages="py2-$_pkgname:_py2 py3-$_pkgname:_py3"
source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz"
builddir="$srcdir/$_pkgname-$pkgver"
@@ -17,11 +18,30 @@ builddir="$srcdir/$_pkgname-$pkgver"
build() {
cd "$builddir"
python2 setup.py build
+ python3 setup.py build
}
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="66a8e7af6a8807c8be68f4d71db25ca6c26f46ddfa9a7e4792a2f73033df81d8392633ff75e6fa131039d9136030844ed93b11316b9f7e2e6ea77675f2f3e528 blessings-1.7.tar.gz"