diff options
author | Francesco Colista <fcolista@alpinelinux.org> | 2016-08-22 14:33:03 +0000 |
---|---|---|
committer | Francesco Colista <fcolista@alpinelinux.org> | 2016-08-22 14:33:03 +0000 |
commit | fe3db3488852a2ade1036090225394e66ca66c76 (patch) | |
tree | 7221817ce139620525ac950ca4bf6ab0c032d232 /community/py-websocket-client | |
parent | 3a8569ea7a6921ac91005a597112bcb93633595e (diff) | |
download | aports-fe3db3488852a2ade1036090225394e66ca66c76.tar.bz2 aports-fe3db3488852a2ade1036090225394e66ca66c76.tar.xz |
community/py-websocket-client: moved from testing, upgraded to 0.37.0, added python3 support and py2/py3 subpackages
Diffstat (limited to 'community/py-websocket-client')
-rw-r--r-- | community/py-websocket-client/APKBUILD | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/community/py-websocket-client/APKBUILD b/community/py-websocket-client/APKBUILD new file mode 100644 index 0000000000..aa324cd31c --- /dev/null +++ b/community/py-websocket-client/APKBUILD @@ -0,0 +1,48 @@ +# Contributor: Francesco Colista <fcolista@alpinelinux.org> +# Maintainer: Francesco Colista <fcolista@alpinelinux.org> +pkgname=py-websocket-client +_pkgname=websocket_client +pkgver=0.37.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="5c2f16904dcb167bd2b85289c6e6fa6a websocket_client-0.37.0.tar.gz" +sha256sums="678b246d816b94018af5297e72915160e2feb042e0cde1a9397f502ac3a52f41 websocket_client-0.37.0.tar.gz" +sha512sums="b72f18c91d9a51a1943fc798601bcd9eac8b1ce807a2abb72b7cf897da30de808160645d9c7f3eaf2430e739cd0c6c01046c452f43c61af63afe7d31d801f9f7 websocket_client-0.37.0.tar.gz" |