aboutsummaryrefslogtreecommitdiffstats
path: root/community/py-jsonrpclib/APKBUILD
blob: ef3321aa4032042b5d4525323bebe3f48adf20ac (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=py-jsonrpclib
_pkgname=jsonrpclib
pkgver=0.1.7
pkgrel=3
pkgdesc="A Python JSON-RPC over HTTP that mirrors xmlrpclib syntax"
url="https://github.com/joshmarshall/jsonrpclib"
arch="noarch"
license="ASL 2.0"
depends=""
makedepends="python2-dev py-setuptools python3-dev"
subpackages="py3-${pkgname#py-}:_py3 py2-${pkgname#py-}:_py2"
source="$pkgname-$pkgver.tar.gz::https://github.com/joshmarshall/$_pkgname/archive/v$pkgver.tar.gz"
builddir="$srcdir/$_pkgname-$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 (for $python)"
	depends="$depends $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
}

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"