diff options
author | Leo <thinkabit.ukim@gmail.com> | 2019-05-03 12:06:14 -0300 |
---|---|---|
committer | prspkt <prspkt@protonmail.com> | 2019-05-06 14:33:53 +0300 |
commit | 2b17e52599512cd24c7ee55ec5a52c835e057617 (patch) | |
tree | 3619139733cfef5a7bb1a3233f3b200c2c98a787 /community/py-msgpack | |
parent | cb7c14ad31c88070ff53fd7ea757085ecf788f09 (diff) | |
download | aports-2b17e52599512cd24c7ee55ec5a52c835e057617.tar.bz2 aports-2b17e52599512cd24c7ee55ec5a52c835e057617.tar.xz |
community/py-msgpack: use C extension and modernize
- Use C extension with Cython
- Fix check
- separate makedepends and checkdepends
Diffstat (limited to 'community/py-msgpack')
-rw-r--r-- | community/py-msgpack/APKBUILD | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/community/py-msgpack/APKBUILD b/community/py-msgpack/APKBUILD index bc0c6a426c..569e9bdd16 100644 --- a/community/py-msgpack/APKBUILD +++ b/community/py-msgpack/APKBUILD @@ -3,30 +3,36 @@ pkgname=py-msgpack _pkgname=msgpack-python pkgver=0.6.1 -pkgrel=1 +pkgrel=2 pkgdesc="A Python module for MessagePack serialization/deserialization" url="https://msgpack.org/" arch="all" license="Apache-2.0" # Dependency (pluggy) to run test is not available -options="!check" depends="" -makedepends="python2-dev python3-dev py-setuptools pytest py3-pytest" +makedepends="python2-dev python3-dev py-setuptools py3-setuptools py-cython py3-cython" +checkdepends="pytest py3-pytest" subpackages="py3-${pkgname/py-/}:_py3 py2-${pkgname/py-/}:_py2" source="$_pkgname-$pkgver.tar.gz::https://github.com/msgpack/msgpack-python/archive/v$pkgver.tar.gz" builddir="$srcdir/msgpack-python-$pkgver" build() { - cd "$builddir" python2 setup.py build python3 setup.py build } -check() { - cd "$builddir" - pytest test - pytest-3 test -} +check() { + local _pyarch + + case "$CARCH" in + x86_64|aarch64) _pyarch="$CARCH" ;; + x86) _pyarch=i686 ;; + armhf|armv7) _pyarch=armv8l ;; + esac + + env PYTHONPATH="${PWD}/build/lib.linux-$_pyarch-2.7" pytest test + env PYTHONPATH="${PWD}/build/lib.linux-$_pyarch-3.7" pytest-3 test +} package() { mkdir -p "$pkgdir" |