diff --git a/python-u-msgpack/PKGBUILD b/python-u-msgpack/PKGBUILD new file mode 100644 index 000000000..5cbf48c01 --- /dev/null +++ b/python-u-msgpack/PKGBUILD @@ -0,0 +1,48 @@ +# Maintainer: Eli Schwartz + +_pkgname=u-msgpack-python +pkgbase='python-u-msgpack' +pkgname=('python3-u-msgpack' 'python2-u-msgpack') +pkgver=2.5.0 +pkgrel=2 +arch=('any') +url="https://github.com/vsergeev/${_pkgname}" +license=('MIT') +makedepends=('python3' 'python2') +checkdepends=('python3-pytest' 'python2-pytest') +source=("https://pypi.io/packages/source/${_pkgname:0:1}/${_pkgname}/${_pkgname}-${pkgver}.tar.gz") +sha256sums=('7ff18ae3721fa75571f9329c08f7c0120416a6ae36194bd8674f65b3b78d0702') + +build() { + cd "${srcdir}/${_pkgname}-${pkgver}" + + python3 setup.py build + python2 setup.py build +} + +check() { + cd "${srcdir}/${_pkgname}-${pkgver}" + + pytest + pytest2 +} + +package_python3-u-msgpack() { + pkgdesc="portable, lightweight MessagePack serializer and deserializer for Python" + depends=('python3') + + cd "${srcdir}/${_pkgname}-${pkgver}" + python3 setup.py install --root="${pkgdir}" --optimize=1 --skip-build + + install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" +} + +package_python2-u-msgpack() { + pkgdesc="portable, lightweight MessagePack serializer and deserializer for Python2" + depends=('python2') + + cd "${srcdir}/${_pkgname}-${pkgver}" + python2 setup.py install --root="${pkgdir}" --optimize=1 --skip-build + + install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" +}