jobextra/python-cairo/PKGBUILD-arch

46 lines
1.3 KiB
Plaintext
Raw Normal View History

# Contributor: Angel Velasquez <angvp@archlinux.org>
# Contributor: Jan de Groot <jgc@archlinux.org>
2022-06-26 20:57:41 +02:00
pkgbase=python-cairo
pkgname=(python-cairo python-cairo-docs)
pkgver=1.26.0
2023-08-01 15:23:50 +02:00
pkgrel=1
2022-06-26 20:57:41 +02:00
pkgdesc="Python bindings for the cairo graphics library"
url="https://pycairo.readthedocs.io/en/latest/"
arch=(x86_64)
license=(LGPL2.1 MPL)
2022-06-26 20:57:41 +02:00
depends=(cairo python)
makedepends=(meson python-sphinx python-sphinx_rtd_theme)
2022-06-26 20:57:41 +02:00
checkdepends=(python-pytest)
2023-08-01 15:23:50 +02:00
source=(https://github.com/pygobject/pycairo/releases/download/v$pkgver/pycairo-$pkgver.tar.gz{,.sig})
sha256sums=('2dddd0a874fbddb21e14acd9b955881ee1dc6e63b9c549a192d613a907f9cbeb'
2023-08-01 15:23:50 +02:00
'SKIP')
2022-06-26 20:57:41 +02:00
validpgpkeys=(0EBF782C5D53F7E5FB02A66746BD761F7A49B0EC) # Christoph Reiter <reiter.christoph@gmail.com>
build() {
arch-meson pycairo-$pkgver build
meson compile -C build
2022-06-26 20:57:41 +02:00
}
check() {
meson test -C build --print-errorlogs
2022-06-26 20:57:41 +02:00
}
package_python-cairo() {
meson install -C build --destdir="$pkgdir"
2022-12-06 17:12:50 +01:00
# compile Python bytecode
python -m compileall -d /usr/lib "$pkgdir/usr/lib"
python -O -m compileall -d /usr/lib "$pkgdir/usr/lib"
2022-06-26 20:57:41 +02:00
}
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: