aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrancesco Colista <fcolista@alpinelinux.org>2016-08-22 12:36:27 +0000
committerFrancesco Colista <fcolista@alpinelinux.org>2016-08-22 14:21:34 +0000
commit120a5b3dcbc2dade7a842b6d745c17bd8d16320d (patch)
tree337ccd83fadb18f82868e09016300509eaf2c02f
parent6d0175348d85ed0105c843e1fd56766c3c499809 (diff)
downloadaports-120a5b3dcbc2dade7a842b6d745c17bd8d16320d.tar.bz2
aports-120a5b3dcbc2dade7a842b6d745c17bd8d16320d.tar.xz
community/py-jsonrpclib: moved from testing, added python3 support and py2/py3 subpackage
-rw-r--r--community/py-jsonrpclib/APKBUILD (renamed from testing/py-jsonrpclib/APKBUILD)29
1 files changed, 23 insertions, 6 deletions
diff --git a/testing/py-jsonrpclib/APKBUILD b/community/py-jsonrpclib/APKBUILD
index e0a4ebb53b..503e24028f 100644
--- a/testing/py-jsonrpclib/APKBUILD
+++ b/community/py-jsonrpclib/APKBUILD
@@ -2,27 +2,44 @@
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=py-jsonrpclib
pkgver=0.1.7
-pkgrel=0
+pkgrel=1
pkgdesc="A Python JSON-RPC over HTTP that mirrors xmlrpclib syntax"
url="https://github.com/joshmarshall/jsonrpclib"
arch="noarch"
license="APACHE2.0"
depends=""
-depends_dev=""
-makedepends="$depends_dev python-dev py-setuptools"
+makedepends="python-dev py-setuptools python3-dev"
install=""
-subpackages=""
+subpackages="py3-${pkgname/py-/}:_py3 py2-${pkgname/py-/}:_py2"
source="$pkgname-$pkgver.tar.gz::https://github.com/joshmarshall/${pkgname/py-/}/archive/v$pkgver.tar.gz"
builddir="$srcdir"/${pkgname/py-/}-$pkgver
+
build() {
cd "$builddir"
- python setup.py build || return 1
+ python2 setup.py build || return 1
+ python3 setup.py build || return 1
}
package() {
+ mkdir -p "$pkgdir"
+}
+
+_py() {
+ local python=$1
+ pkgdesc="$pkgdesc - $python"
+ install_if="$pkgname=$pkgver-r$pkgrel $python"
cd "$builddir"
- python setup.py install --prefix=/usr --root="$pkgdir" || return 1
+ $python setup.py install --prefix=/usr --root="$subpkgdir"
+}
+
+_py2() {
+ _py python2
+ replaces="$pkgname"
+}
+
+_py3() {
+ _py python3
}
md5sums="a071d3bb3f56b9bce4e3740f87784b0a py-jsonrpclib-0.1.7.tar.gz"