# Contributor: Francesco Colista # Maintainer: Francesco Colista pkgname=py-websocket-client _pkgname=websocket_client pkgver=0.42.1 pkgrel=0 pkgdesc="WebSocket client library for Python" url="https://github.com/liris/websocket-client" arch="noarch" license="LGPL" makedepends="python2-dev python3-dev py-setuptools py2-six py3-six" 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 check() { cd "$builddir" python2 setup.py check python3 setup.py check } build() { cd "$builddir" python2 setup.py build python3 setup.py build } 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 } sha512sums="af776e73280f11209d06c8cbf7719d45c50d0a83002b960571f75b60b902666cf994a94b1def80323c8115a76e4d3958c6c2f88a9da4383406ae2db62a057e93 websocket_client-0.42.1.tar.gz"