# Contributor: Valery Kartel # Maintainer: Fabian Affolter pkgname=py-zmq _pkgname=pyzmq pkgver=18.0.1 pkgrel=1 pkgdesc="Python bindings for ZeroMQ" url="https://pypi.python.org/pypi/pyzmq" arch="all" license="LGPL-3.0-or-later BSD" depends="" makedepends="python2-dev python3-dev py-setuptools zeromq-dev" checkdepends="py2-pytest py3-pytest" subpackages="py3-${pkgname/py-/}:_py3 py2-${pkgname/py-/}:_py2" source="https://files.pythonhosted.org/packages/source/p/$_pkgname/$_pkgname-$pkgver.tar.gz" builddir="$srcdir/$_pkgname-$pkgver" build() { cd "$builddir" python2 setup.py build python3 setup.py build } check() { python2 setup.py build_ext --inplace python2 setup.py test python3 setup.py build_ext --inplace python3 setup.py test } 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() { replaces="$pkgname" _py python2 } _py3() { _py python3 } sha512sums="bb120811d160e31ce666d5ea92baacb33f3443522d767069ae58b9d2face973d957340c940006c59f6e163752d9fa26c3495f25dc29257bad0d0aa0d762bc4f2 pyzmq-18.0.1.tar.gz"