diff options
-rw-r--r-- | testing/py-cairocffi/APKBUILD | 69 |
1 files changed, 42 insertions, 27 deletions
diff --git a/testing/py-cairocffi/APKBUILD b/testing/py-cairocffi/APKBUILD index 21a713ff0f..5214cca99a 100644 --- a/testing/py-cairocffi/APKBUILD +++ b/testing/py-cairocffi/APKBUILD @@ -1,40 +1,55 @@ # Contributor: William Pitcock <nenolod@dereferenced.org> -# Maintainer: +# Contributor: Stefan Wagner <stw@bit-strickerei.de> +# Maintainer: Stefan Wagner <stw@bit-strickerei.de> pkgname=py-cairocffi -pkgver=0.7.2 -pkgrel=1 +_pkgname=cairocffi +pkgver=0.9.0 +pkgrel=0 pkgdesc="Python CFFI-based binding to Cairo and GDK-PixBuf" url="https://pythonhosted.org/cairocffi/" arch="noarch" license="BSD" -depends="python2 py-cffi cairo gdk-pixbuf" -depends_dev="" -makedepends="python2-dev py-setuptools" -install="" -subpackages="" -source="https://files.pythonhosted.org/packages/source/c/cairocffi/cairocffi-$pkgver.tar.gz" - -_builddir="$srcdir"/cairocffi-$pkgver -prepare() { - local i - cd "$_builddir" - for i in $source; do - case $i in - *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; - esac - done -} +depends="py-cffi cairo gdk-pixbuf" +checkdepends="pytest pytest-cov ttf-dejavu" +makedepends="python2-dev python3-dev py-setuptools" +subpackages="py2-$_pkgname:_py2 py3-$_pkgname:_py3" +source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz" +builddir="$srcdir"/$_pkgname-$pkgver build() { - cd "$_builddir" - python2 setup.py build || return 1 + cd "$builddir" + python2 setup.py build + python3 setup.py build +} + +check() { + cd "$builddir" + python2 setup.py test + python3 setup.py test } package() { - cd "$_builddir" - python2 setup.py install --prefix=/usr --root="$pkgdir" || return 1 + mkdir -p "$pkgdir" } -md5sums="b7b6a5908f4180deee84f07bcc14253d cairocffi-0.7.2.tar.gz" -sha256sums="e42b4256d27bd960cbf3b91a6c55d602defcdbc2a73f7317849c80279feeb975 cairocffi-0.7.2.tar.gz" -sha512sums="a4b5798ee713a8847ebd21ef328b3e0a94403ce1e80ac108f6d8e4abffbf96551542bb5c848550d82bcebb3d9f645c90ea87fc3eb254bd8e9d57b6a55db76de1 cairocffi-0.7.2.tar.gz" +_py2() { + replaces="$pkgname" + _py python2 +} + +_py3() { + _py python3 +} + +_py() { + local python="$1" + pkgdesc="$pkgdesc (for $python)" + depends="$depends $python" + install_if="$pkgname=$pkgver-r$pkgrel $python" + + cd "$builddir" + $python setup.py install --prefix=/usr --root="$subpkgdir" +} + + +sha512sums="0d3d54e0d54b3696c8336d8b3a6d745628da51d9d9f8c50f36006c007e1432a95dd9bafd8d865923059d040cc4e9f7989b3670a5318383b357ffc979eeb920d5 cairocffi-0.9.0.tar.gz" |