Accepting request 228689 from GNOME:Next

Push GNOME:Next - GNOME 3.12.0

OBS-URL: https://build.opensuse.org/request/show/228689
OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/python-gobject?expand=0&rev=28
This commit is contained in:
2014-04-03 20:49:09 +00:00
committed by Git OBS Bridge
parent 2b3a5c98ba
commit cab81db224
7 changed files with 299 additions and 82 deletions

View File

@@ -37,16 +37,16 @@ Name: python-gobject
Summary: Python bindings for GObject
License: LGPL-2.1+
Group: Development/Libraries/Python
Version: 3.10.2
Version: 3.12.0
Release: 0
Url: http://ftp.gnome.org/pub/GNOME/sources/pygobject/
Source: http://download.gnome.org/sources/pygobject/3.10/%{_name}-%{version}.tar.xz
Source: http://download.gnome.org/sources/pygobject/3.12/%{_name}-%{version}.tar.xz
# PATCH-FIX-UPSTREAM pycompile-searchpath.patch jmatejek@suse.com -- Fix build with python 3.4
Patch1: pycompile-searchpath.patch
BuildRequires: fdupes
BuildRequires: glib2-devel >= 2.35.9
BuildRequires: gobject-introspection-devel >= 1.35.9
BuildRequires: libffi-devel
BuildRequires: glib2-devel >= 2.38.0
BuildRequires: gobject-introspection-devel >= 1.38.0
BuildRequires: libffi-devel >= 3.0.0
%if %{build_for_python3}
BuildRequires: python3-cairo-devel
BuildRequires: python3-devel
@@ -78,29 +78,23 @@ GLib's GObjects.
This package contains the Python Cairo bindings for GObject.
%package -n libpyglib-gi-2_0-python%{local_lib_ver}
Summary: Python Gobject Introspeciton binding
Group: System/Libraries
%description -n libpyglib-gi-2_0-python%{local_lib_ver}
Pygobjects is an extension module for python that gives you access to
GLib's GObjects.
The bindings are handled by gobject-introspection libraries.
%if ! %{build_for_python3}
%package devel
Summary: Python bindings for GObject
Group: Development/Libraries/Python
Requires: %{name} = %{version}
Requires: libpyglib-gi-2_0-python%{local_lib_ver} = %{version}
%if ! %{build_for_python3}
# If somebody wants the -devel package, we provide the full set.
Requires: python3-gobject-devel
%endif
Requires: python3-gobject = %{version}
# Until version 3.11.5, the -devel package contained python2 / python3 specifiecs
# AS this was cleared and the package no longer depends on the python version, the
# python3-gobject-devel package is no longer being built. In order to ease upgrades
# and remove the obsolete package, we obsolete/provide it here.
Obsoletes: python3-gobject-devel < 3.11.5
Provides: python3-gobject-devel = %{version}
%description devel
This package contains files required to build wrappers for gobject
addon libraries such as pygtk.
%endif
%prep
%setup -q -n %{_name}-%{version}
@@ -110,18 +104,16 @@ addon libraries such as pygtk.
%if %{build_for_python3}
export PYTHON=python3
%endif
%configure
%configure \
%if %{build_for_python3}
--without-common
%endif
make %{?jobs:-j%jobs} V=1
%install
%makeinstall
find $RPM_BUILD_ROOT -name '*.la' -or -name '*.a' | xargs rm -f
%if %{build_for_python3}
# If we're building for python3, we remove the header and .pc file...
# Those files are python-version agnostic... so it does not matter.
rm -r %{buildroot}%{_includedir}/pygobject-3.0/pygobject.h
rm %{buildroot}%{_libdir}/pkgconfig/pygobject-3.0.pc
%endif
# Drop pygtkcompat layer.it's useless and we lack other stuff for it to work
rm %{buildroot}%{local_py_sitedir}/gi/pygtkcompat.py
rm -r %{buildroot}%{local_py_sitedir}/pygtkcompat/
@@ -131,10 +123,6 @@ rm examples/Makefile*
%clean
rm -rf $RPM_BUILD_ROOT
%post -n libpyglib-gi-2_0-python%{local_lib_ver} -p /sbin/ldconfig
%postun -n libpyglib-gi-2_0-python%{local_lib_ver} -p /sbin/ldconfig
%files
%defattr(-,root,root)
%doc AUTHORS NEWS README ChangeLog examples
@@ -143,18 +131,13 @@ rm -rf $RPM_BUILD_ROOT
# Lives in cairo subpackage
%exclude %{local_py_sitedir}/gi/_gi_cairo*.so
%files -n libpyglib-gi-2_0-python%{local_lib_ver}
%defattr(-, root, root)
%{_libdir}/libpyglib-gi-2.0-python%{local_py_suffix}.so.0*
%files cairo
%defattr(-,root,root)
%{local_py_sitedir}/gi/_gi_cairo*.so
%if ! %{build_for_python3}
%files devel
%defattr(-,root,root)
%{_libdir}/*.so
%if ! %{build_for_python3}
%{_includedir}/pygobject-3.0/
%{_libdir}/pkgconfig/pygobject-3.0.pc
%endif