%define oname pygobject %define api 2.0 %define major 0 %define libname %mklibname pyglib-gi %api %major %define _exclude_files_from_autoreq ^%{py_platsitedir}/gi/_gobject/__init__.py Summary: Python bindings for GObject Introspection Name: python-gobject3 Version: 2.90.2 Release: %mkrel 2 Source0: http://ftp.gnome.org/pub/GNOME/sources/pygobject/%{oname}-%{version}.tar.xz Patch0: pygobject-2.90.2-link.patch License: LGPLv2+ and MIT Group: Development/Python Url: http://www.gnome.org BuildRequires: python-devel >= 2.5.2 BuildRequires: pkgconfig(glib-2.0) >= 2.24.0 BuildRequires: pkgconfig(gobject-introspection-1.0) >= 0.10.2 BuildRequires: pkgconfig(libffi) >= 3.0 BuildRequires: pkgconfig(pycairo) >= 1.2.0 BuildRequires: gtk-doc BuildRequires: automake %description The %{name} package provides a convenient wrapper for the GObject library for use in Python programs. %package -n python-gi Summary: Python bindings for GObject Introspection Group: Development/Python Provides: python-gobject-introspection = %{version}-%{release} Provides: %{name} = %{version}-%{release} Conflicts: python-gobject < 2.28.6-4 %description -n python-gi The %{name} package provides a convenient wrapper for the GObject library for use in Python programs. This package contains the Python GObject Introspection bindings. %package -n python-gi-cairo Summary: Python-gi bindings for Cairo Group: Development/Python Requires: python-gi = %{version}-%{version} Requires: python-cairo >= 1.2.0 Obsoletes: python-gobject-cairo < 2.28.6-4 Provides: python-gobject-cairo = %{version}-%{version} %description -n python-gi-cairo The %{name} package provides a convenient wrapper for the GObject library for use in Python programs. This package contains the Python-gi Cairo bindings. %package -n %libname Group: System/Libraries Summary: Python GObject Introspection bindings shared library %description -n %libname This archive contains bindings for the GObject, to be used in Python It is a fairly complete set of bindings, it's already rather useful, and is usable to write moderately complex programs. %package devel Group: Development/C Summary: Python-gobject development files Requires: %libname = %version-%release %description devel This contains the python-gobject development files, including C header, pkg-config file. %prep %setup -q -n %oname-%version %patch0 -p0 %build %configure2_5x %make %install rm -rf %{buildroot} %makeinstall_std find %buildroot -name *.la | xargs rm # dsextra stuff is for windows installs so remove it rm -fr %{buildroot}%{python_sitearch}/gtk-2.0 # docs are out of date and are being reworked upstream # so remove them rm -rf %{buildroot}%{_datadir}/gtk-doc rm -rf %{buildroot}%{_datadir}/pygobject %files -n python-gi %defattr(-,root,root) %doc README NEWS AUTHORS ChangeLog %py_platsitedir/gi # Live in cairo subpackage %exclude %py_platsitedir/gi/_gi_cairo.so %files -n python-gi-cairo %defattr(-,root,root) %py_platsitedir/gi/_gi_cairo.so %files -n %libname %defattr(-,root,root) %{_libdir}/libpyglib-gi-%{api}-python.so.%{major}* %files devel %defattr(-,root,root) %{_includedir}/* %{_libdir}/*.so %{_libdir}/pkgconfig/*.pc