Commit 1d68058f authored by Rasmus Thomsen's avatar Rasmus Thomsen Committed by Natanael Copa

main/py-gobject3: upgrade to 3.34.0

* drop py2
parent 3962cfe3
# Contributor: Rasmus Thomsen <oss@cogitri.dev>
# Contributor: Natanael Copa <ncopa@alpinelinux.org>
# Maintainer: Rasmus Thomsen <oss@cogitri.dev>
pkgname=py-gobject3
pkgver=3.32.2
pkgname=py3-gobject3
pkgver=3.34.0
pkgrel=0
pkgdesc="Python bindings for the GObject library"
url="https://wiki.gnome.org/Projects/PyGObject/"
arch="all"
license="LGPL-2.1-or-later"
makedepends="python2-dev python3-dev py-cairo-dev gobject-introspection-dev
makedepends="python3-dev py-cairo-dev gobject-introspection-dev
libffi-dev glib-dev meson"
checkdepends="py2-pytest py3-pytest gtk+3.0-dev xvfb-run"
checkdepends="py3-pytest gtk+3.0-dev xvfb-run"
options="!check" # xvfb-run is in community/ still
subpackages="py2-${pkgname#py-}:_py2 py3-${pkgname#py-}:_py3 $pkgname-dev"
subpackages="$pkgname-dev:_dev"
source="https://download.gnome.org/sources/pygobject/${pkgver%.*}/pygobject-$pkgver.tar.xz"
builddir="$srcdir"/pygobject-$pkgver
build() {
_build python2
_build python3
}
check() {
xvfb-run ninja -C python2 test
xvfb-run ninja -C python3 test
}
replaces="py-gobject3" # Backwards compatibility
provides="py-gobject3=$pkgver-r$pkgrel" # Backwards compatibility
package() {
mkdir -p "$pkgdir"
}
_build() {
local python="$1"
build() {
meson \
--prefix=/usr \
--sysconfdir=/etc \
--mandir=/usr/share/man \
--localstatedir=/var \
--buildtype=release \
-Dpython=$python \
. "$python"
-Dpython=python3 \
. output
ninja -C "$python"
ninja -C output
}
_py2() {
depends="py2-cairo"
_py python2
check() {
xvfb-run ninja -C output test
}
_py3() {
depends="py3-cairo"
_py python3
package() {
DESTDIR="$pkgdir" ninja -C "$builddir"/output install
}
_py() {
local python="$1"
pkgdesc="$pkgdesc (for $python)"
install_if="$pkgname=$pkgver-r$pkgrel $python"
_dev() {
replaces="py-gobject3-dev" # Backwards compatibility
provides="py-gobject3-dev=$pkgver-r$pkgrel" # Backwards compatibility
DESTDIR="$pkgdir" ninja -C "$builddir"/$python install
mkdir -p "$subpkgdir"/usr/lib
mv "$pkgdir"/usr/lib/${python}.* "$subpkgdir"/usr/lib/
default_dev
}
sha512sums="50081bfed45e8b5f0b87fe5c95d4cc12d1b31085e869c603bbc70e34bca69059cc44e8a42270f51e7f04e3ecf2c98da524327a982ed7bb594621fb434d4227f6 pygobject-3.32.2.tar.xz"
sha512sums="782195d22e564b88dea8d43469f0111f398b44b51a63df2fe7d07650af94d5cd037f322a5d7e405338823be3419fcdbf0113fe50b220ab1cfd07d4d01dbc4766 pygobject-3.34.0.tar.xz"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment