aboutsummaryrefslogtreecommitdiffstats
path: root/community/py-jsonrpclib/APKBUILD
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 /community/py-jsonrpclib/APKBUILD
parent6d0175348d85ed0105c843e1fd56766c3c499809 (diff)
downloadaports-120a5b3dcbc2dade7a842b6d745c17bd8d16320d.tar.bz2
aports-120a5b3dcbc2dade7a842b6d745c17bd8d16320d.tar.xz
community/py-jsonrpclib: moved from testing, added python3 support and py2/py3 subpackage
Diffstat (limited to 'community/py-jsonrpclib/APKBUILD')
-rw-r--r--community/py-jsonrpclib/APKBUILD47
1 files changed, 47 insertions, 0 deletions
diff --git a/community/py-jsonrpclib/APKBUILD b/community/py-jsonrpclib/APKBUILD
new file mode 100644
index 0000000000..503e24028f
--- /dev/null
+++ b/community/py-jsonrpclib/APKBUILD
@@ -0,0 +1,47 @@
+# Contributor: Francesco Colista <fcolista@alpinelinux.org>
+# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
+pkgname=py-jsonrpclib
+pkgver=0.1.7
+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=""
+makedepends="python-dev py-setuptools python3-dev"
+install=""
+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"
+ 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="$subpkgdir"
+}
+
+_py2() {
+ _py python2
+ replaces="$pkgname"
+}
+
+_py3() {
+ _py python3
+}
+
+md5sums="a071d3bb3f56b9bce4e3740f87784b0a py-jsonrpclib-0.1.7.tar.gz"
+sha256sums="28355fb625fba393c458a532baa21e6ec063b394a27e5c0abdbc73e6c7e07488 py-jsonrpclib-0.1.7.tar.gz"
+sha512sums="caa315879faac986c14a15cd87591ea2823405f2ea0731962c37147378f77bcfd260c6e7900bc128392332b27e2c0ae23cab9cb6150adb39924f9a369405b2ec py-jsonrpclib-0.1.7.tar.gz"