# Contributor: Stefan Wagner # Maintainer: Stefan Wagner pkgname=py-u-msgpack _pkgname=u-msgpack-python pkgver=2.5.0 pkgrel=0 pkgdesc="A portable, lightweight MessagePack serializer and deserializer written in pure Python." url="https://msgpack.org://github.com/vsergeev/u-msgpack-python" arch="all" license="MIT" depends="" checkdepends="pytest" makedepends="python2-dev python3-dev py-setuptools" subpackages="py3-${pkgname/py-/}:_py3 py2-${pkgname/py-/}:_py2" source="$pkgname-$pkgver.tar.gz::https://github.com/vsergeev/$_pkgname/archive/v$pkgver.tar.gz" builddir="$srcdir/$_pkgname-$pkgver" build() { cd "$builddir" python2 setup.py build python3 setup.py build } check() { cd "$builddir" python2 setup.py test python3 setup.py test } package() { mkdir -p "$pkgdir" } _py2() { _py python2 } _py3() { _py python3 } _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" } sha512sums="d190132c9ba0f936c190c932c477b554172f07f76cebdda9c847adc4636d82c1182716760ca2f21cfc7da4f3e3eeb093be268cca5a1929a5c997781e87f1587e py-u-msgpack-2.5.0.tar.gz"