# Maintainer: Angel Velasquez <angvp@archlinux.org>  
# Maintainer: Jan de Groot <jgc@archlinux.org>

pkgname=python-cairo
pkgver=1.20.1
pkgrel=1
pkgdesc="Python bindings for the cairo graphics library"
arch=('x86_64')
url="https://pycairo.readthedocs.io/en/latest/"
license=('LGPL2.1' 'MPL')
depends=(cairo python)
makedepends=(git)
_commit=320b22711fcc55b0158c156e2aab19a2df0c2898
source=("git+https://github.com/pygobject/pycairo/#commit=$_commit")
sha256sums=('SKIP')

pkgver() {
  cd pycairo
  git describe --tags | sed 's/^v//;s/-/+/g'
}

build() {
  cd pycairo
  python setup.py build
}

package() {
  cd pycairo
  python setup.py install --skip-build --root="${pkgdir}" --optimize='1'
}
