From 147d45457a29854ce25fb50eab513092f71bc075 Mon Sep 17 00:00:00 2001 From: Marian Buschsieweke Date: Tue, 17 Jul 2018 16:53:41 +0200 Subject: testing/py-pymaging: New aport Pure Python imaging library https://github.com/ojii/pymaging/ --- testing/py-pymaging/APKBUILD | 54 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 testing/py-pymaging/APKBUILD (limited to 'testing/py-pymaging/APKBUILD') diff --git a/testing/py-pymaging/APKBUILD b/testing/py-pymaging/APKBUILD new file mode 100644 index 00000000000..5136361f4da --- /dev/null +++ b/testing/py-pymaging/APKBUILD @@ -0,0 +1,54 @@ +# Maintainer: Marian Buschsieweke +pkgname=py-pymaging +_pkgname=pymaging +_commit=596a08fce5664e58d6e8c96847393fbe987783f2 +pkgver=0.0.20130908 +pkgrel=0 +pkgdesc="Pure Python imaging library" +url="https://github.com/ojii/$_pkgname/" +arch="noarch" +license="BSD-3-Clause MIT custom" +depends="py2-${pkgname#py-} py3-${pkgname#py-}" +makedepends="python2-dev python3-dev py-setuptools" +subpackages="py2-${pkgname#py-}:_py2 py3-${pkgname#py-}:_py3" +source="$pkgname-$pkgver.tar.gz::https://github.com/ojii/$_pkgname/archive/$_commit.tar.gz" +builddir="$srcdir"/$_pkgname-$_commit + +build() { + cd "$builddir" + python2 setup.py build + python3 setup.py build +} + +package() { + mkdir -p "$pkgdir" +} + +_py2() { + depends="python2" + _py python2 + rm -rf "$subpkgdir/usr/bin" +} + +_py3() { + depends="python3" + replaces="$pkgname" + _py python3 +} + +_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" +} + +check() { + cd "$builddir" + python2 setup.py test + python3 setup.py test +} + +sha512sums="757431eb53ee839ae8f341c5021b96a704a78434bb81f843de36c0b8274ca8de603ca5f04bf6e38a5dae39d42be2da05f03119235fe5ca5d34bd10fa30faa813 py-pymaging-0.0.20130908.tar.gz" -- cgit v1.2.3