Name python-cairo
Description Python bindings for the cairo graphics library
Version 1.29.0-2
Package Base python-cairo
Homepage https://pycairo.readthedocs.io/en/latest/
Maintainers ['Caleb Maclennan <caleb@alerque.com>', 'Jelle van der Waa <jelle@archlinux.org>']
Contributors ['Angel Velasquez <angvp@archlinux.org> ', 'Jan de Groot <jgc@archlinux.org>']
Distro-repo https://gitlab.archlinux.org/archlinux/packaging/packages/python-cairo
Sources ['https://github.com/pygobject/pycairo/releases/download/v1.29.0/pycairo-1.29.0.tar.gz', 'https://github.com/pygobject/pycairo/releases/download/v1.29.0/pycairo-1.29.0.tar.gz.sig']
Dependencies ['cairo', 'python']
Optional-Dependencies []
Build-Dependencies ['meson', 'python-sphinx', 'python-sphinx_rtd_theme']
Provides []
Builddate 14-12-2025 18:23:29
Architecture x86_64
Distro-Version
Licenses ['LGPL2.1', 'MPL']
Hash c5871444426c63db35211c14ef52c78ff3fed55677416eadc04e94c6e81ec6cd
# Maintainer: Caleb Maclennan <caleb@alerque.com>
# Contributor: Angel Velasquez <angvp@archlinux.org>  
# Contributor: Jan de Groot <jgc@archlinux.org>

pkgbase=python-cairo
pkgname=(python-cairo python-cairo-docs)
pkgver=1.29.0
pkgrel=2
pkgdesc="Python bindings for the cairo graphics library"
url="https://pycairo.readthedocs.io/en/latest/"
arch=(x86_64)
license=(LGPL2.1 MPL)
depends=(cairo python)
makedepends=(meson python-sphinx python-sphinx_rtd_theme)
checkdepends=(python-pytest)
source=(https://github.com/pygobject/pycairo/releases/download/v$pkgver/pycairo-$pkgver.tar.gz{,.sig})
sha256sums=('f3f7fde97325cae80224c09f12564ef58d0d0f655da0e3b040f5807bd5bd3142'
            'SKIP')
validpgpkeys=(0EBF782C5D53F7E5FB02A66746BD761F7A49B0EC) # Christoph Reiter <reiter.christoph@gmail.com>

build() {
  arch-meson pycairo-$pkgver build
  meson compile -C build
}

check() {
  meson test -C build --print-errorlogs
}

package_python-cairo() {
  meson install -C build --destdir="$pkgdir"

  # compile Python bytecode
  python -m compileall -d /usr/lib "$pkgdir/usr/lib"
  python -O -m compileall -d /usr/lib "$pkgdir/usr/lib"
}

package_python-cairo-docs() {
  pkgdesc="Developer documentation for Pycairo"
  depends=()

  python -m sphinx -b html pycairo-$pkgver/docs "$pkgdir/usr/share/doc/pycairo/html"
  rm -r "$pkgdir/usr/share/doc/pycairo/html/.doctrees"
}

# vim:set sw=2 sts=-1 et: