added community/python2-msgpack

This commit is contained in:
Kevin Mihelich 2020-04-23 23:56:38 +00:00
parent 8e53bb9e09
commit be71a28f25

View file

@ -0,0 +1,43 @@
# Maintainer: Johannes Löthberg <johannes@kyriasis.com>
# Contributor: Sébastien "Seblu" Luttringer
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
# - python2 variant dropped upstream, still a dependency for packages
pkgname=python2-msgpack
pkgver=0.6.2
pkgrel=4
url='https://github.com/msgpack/msgpack-python'
arch=('x86_64')
license=('Apache')
makedepends=('cython2' 'python2-setuptools')
checkdepends=('python2-pytest' 'python2-six')
source=(msgpack-python-$pkgver.tar.gz::https://github.com/msgpack/msgpack-python/archive/v$pkgver.tar.gz)
md5sums=('e751675f8e18625bf1d2ec391dd9e8fd')
build() {
cd msgpack-python-$pkgver
python2 setup.py build --build-lib=build/python2
find build/python2 -type f -exec \
sed -i '1s,^#! \?/usr/bin/\(env \|\)python$,#!/usr/bin/python2,' {} \;
}
check() {
cd msgpack-python-$pkgver
PYTHONPATH=$PWD/build/python2 py.test2 test
}
package() {
pkgdesc='MessagePack serializer implementation for Python2'
depends=('python2')
cd msgpack-python-$pkgver
python2 setup.py build --build-lib=build/python2 \
install --root="$pkgdir" --optimize=1
}
# vim:set ts=2 sw=2 et: