aboutsummaryrefslogtreecommitdiffstats
path: root/community/py-websocket-client/APKBUILD
blob: b71dafdd2343b3b45ee05f89a1ff0e780b2e202a (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-websocket-client
_pkgname=websocket_client
pkgver=0.39.0
pkgrel=0
pkgdesc="WebSocket client library for Python"
url="https://github.com/liris/websocket-client"
arch="noarch"
license="LGPL"
depends=""
makedepends="python2-dev python3-dev py-setuptools py2-six py3-six"
install=""
subpackages="py3-${pkgname/py-/}:_py3 py2-${pkgname/py-/}:_py2"
source="https://files.pythonhosted.org/packages/source/w/websocket-client/$_pkgname-$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 - $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="361ad4123a24f93bab9882e1d067de74  websocket_client-0.39.0.tar.gz"
sha256sums="87c6ba46565d62bcdbc5ac1d78c9a6d66663560ab2ca566cf9c6ac406de13425  websocket_client-0.39.0.tar.gz"
sha512sums="12f9375598ee151ebc005b3948fc47e7186afeb6b168a5c8b61bb1f836d6eebc011b29d24ad26f6da59ffa4f4135e5736b0198fc34b02bb7ba877df056447908  websocket_client-0.39.0.tar.gz"