Name python-gobject
Description Python bindings for GLib/GObject/GIO/GTK
Version 3.54.5-2
Package Base pygobject
Homepage https://pygobject.gnome.org/
Maintainers ['Antonio Rojas <arojas@archlinux.org>', 'Fabian Bornschein <fabiscafe@archlinux.org>', 'Jan Alexander Steffens (heftig) <heftig@archlinux.org>']
Contributors ['Ionut Biru <ibiru@archlinux.org>']
Distro-repo https://gitlab.archlinux.org/archlinux/packaging/packages/pygobject
Sources ['git+https://github.com/python/pythoncapi-compat#commit=632d1aa0c4be6c67498d6b97630ddd7d7eb0f90a', 'git+https://gitlab.gnome.org/GNOME/gobject-introspection-tests.git#commit=ddd662bb9cdc29f047b239789fb7e56e68fa66bb', 'git+https://gitlab.gnome.org/GNOME/pygobject.git?signed#tag=3.54.5']
Dependencies ['glib2', 'glibc', 'gobject-introspection-runtime', 'libffi', 'python']
Optional-Dependencies ['python-cairo']
Build-Dependencies ['git', 'gobject-introspection', 'meson', 'python-cairo', 'python-pydata-sphinx-theme', 'python-setuptools', 'python-sphinx', 'python-sphinx-copybutton']
Provides ['pygobject-devel']
Builddate 16-12-2025 12:15:33
Architecture x86_64
Distro-Version
Licenses ['LGPL-2.1-or-later']
Hash f010df09d8c072c659c3fc2a9dd751e5e9f22d2e7eab8005291f4c29b55ebb46
# Maintainer: Jan Alexander Steffens (heftig) <heftig@archlinux.org>
# Maintainer: Fabian Bornschein <fabiscafe@archlinux.org>
# Contributor: Ionut Biru <ibiru@archlinux.org>

pkgbase=pygobject
pkgname=(
  python-gobject
  python-gobject-docs
)
pkgver=3.54.5
pkgrel=2
pkgdesc="Python bindings for GLib/GObject/GIO/GTK"
url="https://pygobject.gnome.org/"
arch=(x86_64)
license=(LGPL-2.1-or-later)
depends=(
  glib2
  glibc
  gobject-introspection-runtime
  libffi
  python
)
makedepends=(
  git
  gobject-introspection
  meson
  python-cairo
  python-pydata-sphinx-theme
  python-setuptools
  python-sphinx
  python-sphinx-copybutton
)
checkdepends=(
  gdk-pixbuf2
  gtk4
  python-pytest
  xorg-server-xvfb
)
optdepends=('python-cairo: Cairo bindings')
source=(
  "git+https://gitlab.gnome.org/GNOME/pygobject.git?signed#tag=$pkgver"
  "git+https://gitlab.gnome.org/GNOME/gobject-introspection-tests.git#commit=ddd662bb9cdc29f047b239789fb7e56e68fa66bb"
  "git+https://github.com/python/pythoncapi-compat#commit=632d1aa0c4be6c67498d6b97630ddd7d7eb0f90a"
)
b2sums=('5f9a819f4077f271f35d2aba25fc05eb096a59bfa2e93b5a9d4cda2d7afdb0a0f8befdeaedab16bfb99c2604ef49f056349671bbb1e372fc060aaf6e64ea2bf6'
        '9cda3c56ea795e6ec575041215134f0b1fcd21305de240a4820f5ae12744be9ae6e8f4942b686139a6a7056b1f893fe4555d9fb3f9ef23351c592a2da0455f6e'
        'd06b53e843b343f4e4a642f4c894e8f8e4aec55e1939427265c8538a7d504642570e8efdc1d86bb719da63f05a9e2174ad0828d4d49d6f8db51875df93b1ab1b')
validpgpkeys=(
  0EBF782C5D53F7E5FB02A66746BD761F7A49B0EC # Christoph Reiter <reiter.christoph@gmail.com>
  12B7C9847B4AD5787318A831A61779569ADCE5E6 # Arjan Molenaar <gaphor@gmail.com>
)

prepare() {
  cd pygobject
}

build() {
  # Inject subprojects
  export MESON_PACKAGE_CACHE_DIR="$srcdir"

  arch-meson pygobject build
  meson compile -C build
}

check() {
  PYTEST_ADDOPTS="-v" PYGI_TEST_VERBOSE=1 \
    xvfb-run -s '-nolisten local' \
    meson test -C build --print-errorlogs
}

package_python-gobject() {
  provides=("pygobject-devel=$pkgver")
  conflicts=(pygobject-devel)
  replaces=('pygobject-devel<=3.36.1-1')

  meson install -C build --destdir "$pkgdir"
  python -m compileall -d /usr/lib "$pkgdir/usr/lib"
  python -O -m compileall -d /usr/lib "$pkgdir/usr/lib"
}

package_python-gobject-docs() {
  pkgdesc="Developer documentation for PyGObject"
  depends=()
  optdepends=()

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


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