# Contributor: Stefan Wagner # Maintainer: Stefan Wagner pkgname=py-u-msgpack _pkgname=u-msgpack-python pkgver=2.5.1 pkgrel=0 pkgdesc="A portable, lightweight MessagePack serializer and deserializer written in pure Python." url="https://github.com/vsergeev/u-msgpack-python" arch="noarch" 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="a39e052b2776e271f177eebae6d18110ee62748ae4394c7c3fce71cdf7baa8371b468d5a6dcaf56491c6429b3b3bd805949c198b526c9e3a8f28949fe3915a40 py-u-msgpack-2.5.1.tar.gz"