python-cairo 1.27.0-1

This commit is contained in:
xhaa123 2024-11-02 22:44:08 +08:00
parent bedece0cd1
commit 6c5b0e5485

View File

@ -4,28 +4,41 @@
# then please put 'unknown'.
# Maintainer: Future Linux Team <future_linux@163.com>
pkgname=python-cairo
pkgver=1.26.0
pkgname=(python-cairo python-cairo-docs)
pkgbase=python-cairo
pkgver=1.27.0
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=('python' 'cairo')
makedepends=('meson')
source=(https://github.com/pygobject/pycairo/releases/download/v${pkgver}/py${pkgname#*-}-${pkgver}.tar.gz)
sha256sums=(2dddd0a874fbddb21e14acd9b955881ee1dc6e63b9c549a192d613a907f9cbeb)
makedepends=('meson' 'python-sphinx' 'python-sphinx_rtd_theme')
source=(https://github.com/pygobject/pycairo/releases/download/v${pkgver}/py${pkgbase#*-}-${pkgver}.tar.gz)
sha256sums=(5cb21e7a00a2afcafea7f14390235be33497a2cce53a98a19389492a60628430)
build() {
cd py${pkgname#*-}-${pkgver}
cd py${pkgbase#*-}-${pkgver}
meson setup build --prefix=/usr --buildtype=release
meson compile -C build
}
package() {
cd py${pkgname#*-}-${pkgver}
package_python-cairo() {
cd py${pkgbase#*-}-${pkgver}
meson install -C build --destdir ${pkgdir}
# compile Python bytecode
python3 -m compileall -d /usr/lib64 ${pkgdir}/usr/lib64
python3 -O -m compileall -d /usr/lib64 ${pkgdir}/usr/lib64
}
package_python-cairo-docs() {
pkgdesc="Developer documentation for Pycairo"
depends=()
python3 -m sphinx -b html py${pkgbase#*-}-${pkgver}/docs ${pkgdir}/usr/share/doc/pycairo/html
rm -r ${pkgdir}/usr/share/doc/pycairo/html/.doctrees
}