aboutsummaryrefslogtreecommitdiffstats
path: root/testing/py-prettytable
diff options
context:
space:
mode:
authorRoberto Oliveira <robertoguimaraes8@gmail.com>2018-07-19 19:24:19 +0000
committerRoberto Oliveira <robertoguimaraes8@gmail.com>2018-07-19 19:41:38 +0000
commit9877418480050ed02a76b10eea686a0ca9d1112a (patch)
tree6f8b8c38a095d0d76658e6f1915bdea945e9f422 /testing/py-prettytable
parentf22aba5b6efff4b64827656de3deaf4f1f3a690d (diff)
downloadaports-9877418480050ed02a76b10eea686a0ca9d1112a.tar.bz2
aports-9877418480050ed02a76b10eea686a0ca9d1112a.tar.xz
testing/py-prettytable: add python3
Diffstat (limited to 'testing/py-prettytable')
-rw-r--r--testing/py-prettytable/APKBUILD27
1 files changed, 22 insertions, 5 deletions
diff --git a/testing/py-prettytable/APKBUILD b/testing/py-prettytable/APKBUILD
index 87af4c4dcc..bd5b1caea4 100644
--- a/testing/py-prettytable/APKBUILD
+++ b/testing/py-prettytable/APKBUILD
@@ -8,10 +8,8 @@ pkgdesc="A simple Python library for easily displaying tabular data in a visuall
url="http://code.google.com/p/prettytable/"
arch="noarch"
license="BSD"
-depends="python2"
-makedepends="py-setuptools"
-install=""
-subpackages=""
+makedepends="python2-dev python3-dev py-setuptools"
+subpackages="py3-${pkgname#py-}:_py3 py2-${pkgname#py-}:_py2"
source="https://files.pythonhosted.org/packages/source/P/PrettyTable/$_pkgname-$pkgver.tar.gz"
builddir="$srcdir/$_pkgname-$pkgver"
@@ -19,11 +17,30 @@ builddir="$srcdir/$_pkgname-$pkgver"
build() {
cd "$builddir"
python2 setup.py build
+ python3 setup.py build
}
package() {
cd "$builddir"
- python2 setup.py install --prefix=/usr --root="$pkgdir"
+ mkdir -p "$pkgdir"
+}
+
+_py() {
+ local python="$1"
+ pkgdesc="$pkgdesc (for $python)"
+ install_if="$pkgname=$pkgver-r$pkgrel $python"
+
+ cd "$builddir"
+ $python setup.py install --prefix=/usr --root="$subpkgdir"
+}
+
+_py2() {
+ replaces="$pkgname"
+ _py python2
+}
+
+_py3() {
+ _py python3
}
sha512sums="84611b9ad11bd428cdb00795e0a9baff44d027331b73ed1742596acda8acc8aca3df4276fa2f2ca2289f10b2989b3c86556de70bca6a9773b15cd80c54c33117 prettytable-0.7.2.tar.gz"