%define glib2_version 2.48.0 %define gobject_introspection_version 1.46.0 %define pycairo_version 1.11.1 %global __python3 /usr/bin/python3.11 %global python3_pkgversion 3.11 %global with_check 0 Name: pygobject3 Version: 3.42.2 Release: 1%{?dist} Summary: Python bindings for GObject Introspection License: LGPLv2+ and MIT URL: https://wiki.gnome.org/Projects/PyGObject Source0: https://gitlab.gnome.org/GNOME/pygobject/-/archive/%{version}/pygobject-%{version}.tar.gz BuildRequires: glib2-devel >= %{glib2_version} BuildRequires: gobject-introspection-devel >= %{gobject_introspection_version} BuildRequires: meson BuildRequires: pkgconfig(libffi) BuildRequires: python%{python3_pkgversion}-devel BuildRequires: python%{python3_pkgversion}-cairo-devel >= %{pycairo_version} BuildRequires: cairo-gobject-devel # Required by the upstream selftest suite: %if %{with_check} ## for the Gdk and Gtk typelibs, used during the test suite: BuildRequires: gtk3 ## for xvfb-run: BuildRequires: xorg-x11-server-Xvfb BuildRequires: dejavu-sans-fonts BuildRequires: dejavu-sans-mono-fonts BuildRequires: dejavu-serif-fonts ## for dbus-launch, used by test_gdbus: BuildRequires: dbus-x11 %endif %description The %{name} package provides a convenient wrapper for the GObject library for use in Python programs. %package -n python%{python3_pkgversion}-gobject Summary: Python %{python3_pkgversion} bindings for GObject Introspection Requires: python%{python3_pkgversion}-gobject-base%{?_isa} = %{version}-%{release} # The cairo override module depends on this Requires: python%{python3_pkgversion}-cairo%{?_isa} >= %{pycairo_version} %description -n python%{python3_pkgversion}-gobject The python3-gobject package provides a convenient wrapper for the GObject library and and other libraries that are compatible with GObject Introspection, for use in Python %{python3_pkgversion} programs. %package -n python%{python3_pkgversion}-gobject-base Summary: Python %{python3_pkgversion} bindings for GObject Introspection base package Requires: gobject-introspection%{?_isa} >= %{gobject_introspection_version} %description -n python%{python3_pkgversion}-gobject-base This package provides the non-cairo specific bits of the GObject Introspection library. %package devel Summary: Development files for embedding PyGObject introspection support Requires: python%{python3_pkgversion}-gobject%{?_isa} = %{version}-%{release} Requires: gobject-introspection-devel%{?_isa} %description devel This package contains files required to embed PyGObject %prep %setup -q -n pygobject-%{version} %build %meson -Dpython=%{__python3} %meson_build %install %meson_install %check %if %{with_check} # Run the selftests under a temporary xvfb X server (so that they can # initialize Gdk etc): xvfb-run make DESTDIR=$RPM_BUILD_ROOT check V=1 %endif # with_check %files -n python%{python3_pkgversion}-gobject %{python3_sitearch}/gi/_gi_cairo*.so %files -n python%{python3_pkgversion}-gobject-base %license COPYING %doc NEWS %{python3_sitearch}/gi/ %{python3_sitelib}/gi/ %{python3_sitelib}/pygtkcompat/ %exclude %{python3_sitearch}/gi/_gi_cairo*.so %{python3_sitearch}/PyGObject-*.egg-info %files devel %doc examples/ %dir %{_includedir}/pygobject-3.0/ %{_includedir}/pygobject-3.0/pygobject.h %{_libdir}/pkgconfig/pygobject-3.0.pc %changelog