# Contributor: # Contributor: Stefan Wagner # Maintainer: Stefan Wagner pkgname=py-cairocffi _pkgname=cairocffi pkgver=0.9.0 pkgrel=1 pkgdesc="Python CFFI-based binding to Cairo and GDK-PixBuf" url="https://pythonhosted.org/cairocffi/" arch="noarch" license="BSD" 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 python3 setup.py build } check() { cd "$builddir" python2 setup.py test python3 setup.py test } package() { mkdir -p "$pkgdir" } _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"