aboutsummaryrefslogtreecommitdiffstats
path: root/community/py3-msgpack
diff options
context:
space:
mode:
authorLeo <thinkabit.ukim@gmail.com>2019-09-13 20:14:27 -0300
committerLeo <thinkabit.ukim@gmail.com>2019-09-13 22:40:50 -0300
commit3b34f5d0c8e67275626b8362437ba4f4611a76ed (patch)
tree1433554fe44da140371b55eab7a02d4f0938a942 /community/py3-msgpack
parent37985a702b4223644a5cabfdf69494ebe451717c (diff)
downloadaports-3b34f5d0c8e67275626b8362437ba4f4611a76ed.tar.bz2
aports-3b34f5d0c8e67275626b8362437ba4f4611a76ed.tar.xz
community/py3-msgpack: rename from py-msgpack
Diffstat (limited to 'community/py3-msgpack')
-rw-r--r--community/py3-msgpack/APKBUILD58
1 files changed, 58 insertions, 0 deletions
diff --git a/community/py3-msgpack/APKBUILD b/community/py3-msgpack/APKBUILD
new file mode 100644
index 0000000000..7b0750ddf1
--- /dev/null
+++ b/community/py3-msgpack/APKBUILD
@@ -0,0 +1,58 @@
+# Contributor: Francesco Colista <fcolista@alpinelinux.org>
+# Maintainer: Fabian Affolter <fabian@affolter-engineering.ch>
+pkgname=py-msgpack
+_pkgname=msgpack-python
+pkgver=0.6.1
+pkgrel=4
+pkgdesc="A Python module for MessagePack serialization/deserialization"
+url="https://msgpack.org/"
+arch="all"
+license="Apache-2.0"
+makedepends="python2-dev python3-dev py-setuptools py3-setuptools
+ cython2 cython3"
+checkdepends="py3-pytest py3-pluggy"
+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() {
+ python2 setup.py build
+ python3 setup.py build
+}
+
+check() {
+ local _pyarch
+
+ case "$CARCH" in
+ x86_64|aarch64|ppc64le) _pyarch="$CARCH" ;;
+ x86) _pyarch=i686 ;;
+ armhf|armv7) _pyarch=armv8l ;;
+ s390x) _pyarch=s390x;;
+ esac
+
+ env PYTHONPATH="$PWD/build/lib.linux-$_pyarch-3.7" pytest-3 test
+}
+
+package() {
+ mkdir -p "$pkgdir"
+}
+
+_py() {
+ local python=$1
+ pkgdesc="$pkgdesc (for $python)"
+ install_if="$pkgname=$pkgver-r$pkgrel $python"
+
+ cd "$builddir"
+ $python setup.py install --prefix=/usr --root="$subpkgdir"
+}
+
+_py2() {
+ replaces="$pkgname"
+ _py python2
+}
+
+_py3() {
+ _py python3
+}
+
+sha512sums="cce526f103b0e2698e1d3931f34c18ebfe79dedd486aa3d051ce80b80e0fc73dc5961645205525002b24990b1c74cb17bee4be1b7d7a45fb232cbf108f929982 msgpack-python-0.6.1.tar.gz"