Accepting request 491572 from GNOME:Next

Forward single-spec setup.... G:N no longer shows any signs or errors

OBS-URL: https://build.opensuse.org/request/show/491572
OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/python-gobject?expand=0&rev=81
This commit is contained in:
Dominique Leuenberger 2017-05-10 10:14:47 +00:00 committed by Git OBS Bridge
parent 8f639b6cd8
commit c8ddd9626f
7 changed files with 114 additions and 2208 deletions

View File

@ -1,4 +0,0 @@
#!/bin/sh
sed 's,build_for_python3 0,build_for_python3 1,;s,^\(Name: *\)python-gobject,\1python3-gobject,' python-gobject.spec > python3-gobject.spec
cp python-gobject.changes python3-gobject.changes

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:4e228b1c0f36e810acd971fad1c7030014900d8427c308d63a560f3f1037fa3c
size 758336

3
pygobject-3.24.1.tar.xz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:a628a95aa0909e13fb08230b1b98fc48adef10b220932f76d62f6821b3fdbffd
size 758648

View File

@ -1,3 +1,19 @@
-------------------------------------------------------------------
Wed Apr 19 14:34:42 UTC 2017 - zaitor@opensuse.org
- Update to version 3.24.1:
+ pygi-info: initialize GIArgument before passing it to
g_constant_info_get_value (bgo#772949).
-------------------------------------------------------------------
Mon Mar 27 18:08:28 UTC 2017 - toddrme2178@gmail.com
- Switch to single-spec version.
- Add python version-dependent wrapper packages to pull in
necessary dependencies.
- Include all dependencies in -devel packages.
- Rebase .changes file to include changes in -devel package.
------------------------------------------------------------------- -------------------------------------------------------------------
Mon Mar 20 15:28:17 UTC 2017 - dimstar@opensuse.org Mon Mar 20 15:28:17 UTC 2017 - dimstar@opensuse.org

View File

@ -16,72 +16,54 @@
# #
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
# This figures in an error message # This figures in an error message
%global __requires_exclude typelib\\(%%namespaces\\) %global __requires_exclude typelib\\(%%namespaces\\)
%global __requires_exclude_from ^%{local_py_sitedir}/gi/__init__.py$ %global __requires_exclude_from ^%{python2_sitearch}/gi/__init__.py$
%define build_for_python3 0 %global __requires_exclude_from ^%{python3_sitearch}/gi/__init__.py$
%if %{build_for_python3}
%define local_py_requires Requires: python(abi) = %py3_ver
%define local_py_sitedir %{python3_sitearch}
%define local_py_suffix 3
%define local_py_pkg python3
%define local_lib_ver 3-0
%else
%define local_py_requires %{py_requires}
%define local_py_sitedir %{py_sitedir}
%define local_py_suffix 2
%define local_py_pkg python
%define local_lib_ver 2-0
%endif
Name: python-gobject Name: python-gobject
%define _name pygobject %define _name pygobject
Summary: Python bindings for GObject Summary: Python bindings for GObject
License: LGPL-2.1+ License: LGPL-2.1+
Group: Development/Libraries/Python Group: Development/Libraries/Python
Version: 3.24.0 Version: 3.24.1
Release: 0 Release: 0
Url: https://wiki.gnome.org/Projects/PyGObject/ Url: https://wiki.gnome.org/Projects/PyGObject/
Source: http://download.gnome.org/sources/pygobject/3.24/%{_name}-%{version}.tar.xz Source: http://download.gnome.org/sources/pygobject/3.24/%{_name}-%{version}.tar.xz
# PATCH-FIX-UPSTREAM pycompile-searchpath.patch jmatejek@suse.com -- Fix build with python 3.4 # PATCH-FIX-UPSTREAM pycompile-searchpath.patch jmatejek@suse.com -- Fix build with python 3.4
Patch1: pycompile-searchpath.patch Patch1: pycompile-searchpath.patch
BuildRequires: %{python_module cairo-devel}
BuildRequires: %{python_module cairo}
BuildRequires: %{python_module devel}
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes BuildRequires: fdupes
BuildRequires: glib2-devel >= 2.38.0 BuildRequires: glib2-devel >= 2.38.0
BuildRequires: gnome-common BuildRequires: gnome-common
BuildRequires: gobject-introspection-devel >= 1.46.0 BuildRequires: gobject-introspection-devel >= 1.46.0
BuildRequires: libffi-devel >= 3.0.0 BuildRequires: libffi-devel >= 3.0.0
%if %{build_for_python3} BuildRequires: python-rpm-macros
BuildRequires: python3-cairo-devel
BuildRequires: python3-devel
%else
BuildRequires: python-cairo-devel
BuildRequires: python-devel
%endif
BuildRequires: pkgconfig(cairo) BuildRequires: pkgconfig(cairo)
BuildRequires: pkgconfig(cairo-gobject) BuildRequires: pkgconfig(cairo-gobject)
# Trigger an automatic installation of python(3)?-gobject when python and libgirepository are installed. # Trigger an automatic installation of python(3)?-gobject when python and libgirepository are installed.
Supplements: packageand(%{local_py_pkg}:libgirepository-1_0-1) Supplements: packageand(python:%{gdk_real_package})
%if %local_py_suffix == 2
Provides: python2-gobject = %{version}
%endif
BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRoot: %{_tmppath}/%{name}-%{version}-build
%{local_py_requires}
%python_subpackages
%description %description
Pygobjects is an extension module for python that gives you access to Pygobjects is an extension module for python that gives you access to
GLib's GObjects. GLib's GObjects.
%package Gdk %package Gdk
Summary: Python bindings for GObject -- Gdk bindings Summary: Python bindings for GObject -- Gdk bindings
Group: Development/Libraries/Python Group: Development/Libraries/Python
Requires: %{name} = %{version} Requires: %{name} = %{version}
Requires: %{name}-cairo = %{version} Requires: %{name}-cairo = %{version}
%if %local_py_suffix == 2 %define gdk_real_package %(rpm -q --qf '%%{NAME}' -f $(readlink %{_libdir}/libgdk-3.so -f))
Provides: python2-gobject-Gdk = %{version} Supplements: packageand(python-gobject:%{gdk_real_package})
%endif
%define gdk_real_package %(rpm -q --qf '%%{NAME}' -f $(readlink /usr/lib64/libgdk-3.so -f))
Supplements: packageand(%{name}:%{gdk_real_package})
%description Gdk %description Gdk
Pygobjects is an extension module for python that gives you access to Pygobjects is an extension module for python that gives you access to
@ -89,15 +71,13 @@ GLib's GObjects.
This package contains the Python Gdk bindings for GObject. This package contains the Python Gdk bindings for GObject.
%package cairo %package cairo
Summary: Python bindings for GObject -- Cairo bindings Summary: Python bindings for GObject -- Cairo bindings
Group: Development/Libraries/Python Group: Development/Libraries/Python
Requires: %{name} = %{version} Requires: %{name} = %{version}
%if %local_py_suffix == 2
Provides: python2-gobject-cairo = %{version}
%endif
%define cairo_real_package %(rpm -q --qf '%%{NAME}' --whatprovides cairo) %define cairo_real_package %(rpm -q --qf '%%{NAME}' --whatprovides cairo)
Supplements: packageand(%{name}:%{cairo_real_package}) Supplements: packageand(python-gobject:%{cairo_real_package})
%description cairo %description cairo
Pygobjects is an extension module for python that gives you access to Pygobjects is an extension module for python that gives you access to
@ -105,24 +85,38 @@ GLib's GObjects.
This package contains the Python Cairo bindings for GObject. This package contains the Python Cairo bindings for GObject.
%if ! %{build_for_python3}
# Dummy wrapper file to pull in all Python-version-specific dependencies
%package devel %package devel
Summary: Python bindings for GObject Summary: Python bindings for GObject -- development files
Group: Development/Libraries/Python Group: Development/Libraries/Python
Requires: %{name} = %{version} Requires: %{name} = %{version}
Requires: python3-gobject = %{version} Requires: %{name}-Gdk = %{version}
# Until version 3.11.5, the -devel package contained python2 / python3 specifiecs Requires: %{name}-cairo = %{version}
# AS this was cleared and the package no longer depends on the python version, the Requires: %{name}-common-devel = %{version}
# python3-gobject-devel package is no longer being built. In order to ease upgrades Requires: python-devel
# and remove the obsolete package, we obsolete/provide it here.
Obsoletes: python3-gobject-devel < 3.11.5
Provides: python2-gobject-devel = %{version}
Provides: python3-gobject-devel = %{version}
%description devel %description devel
This package contains files required to build wrappers for gobject This package contains files required to build wrappers for gobject
addon libraries such as pygtk. addon libraries such as pygtk.
%endif
%package -n %{name}-common-devel
Summary: Python bindings for GObject -- shared development files
Group: Development/Libraries/Python
Requires: %{python_module gobject-devel = %{version}}
Requires: glib2-devel >= 2.38.0
Requires: gnome-common
Requires: gobject-introspection-devel >= 1.46.0
Requires: libffi-devel >= 3.0.0
Requires: pkgconfig(cairo)
Requires: pkgconfig(cairo-gobject)
Provides: %{python_module gobject-common-devel = %{version}}
%description -n %{name}-common-devel
This package contains common files required to build wrappers for gobject
addon libraries such as pygtk in both Python2 and Python3.
%prep %prep
%setup -q -n %{_name}-%{version} %setup -q -n %{_name}-%{version}
@ -130,60 +124,76 @@ addon libraries such as pygtk.
%build %build
autoreconf -fiv autoreconf -fiv
%if %{build_for_python3}
export PYTHON=python3 # We want to do an out-of-source build
%else %define _configure ../configure
export PYTHON=python2
%endif %{python_expand mkdir build_%{$python_bin_suffix}
%configure \ pushd build_%{$python_bin_suffix}
%if %{build_for_python3}
--without-common export PYTHON=$python
%endif %configure
make %{?jobs:-j%jobs} V=1 make %{?jobs:-j%jobs} V=1
popd
}
%install %install
%makeinstall %{python_expand pushd build_%{$python_bin_suffix}
find $RPM_BUILD_ROOT -name '*.la' -or -name '*.a' | xargs rm -f
%make_install
popd
}
# Drop pygtkcompat layer.it's useless and we lack other stuff for it to work # Drop pygtkcompat layer.it's useless and we lack other stuff for it to work
rm %{buildroot}%{local_py_sitedir}/gi/pygtkcompat.py %python_expand rm %{buildroot}%{$python_sitearch}/gi/pygtkcompat.py*
rm -r %{buildroot}%{local_py_sitedir}/pygtkcompat/ %python_expand rm -r %{buildroot}%{$python_sitearch}/pygtkcompat/
# Drop GIMarshallingTests - It's test suite remainders that should not be installed # Drop GIMarshallingTests - It's test suite remainders that should not be installed
find %{buildroot}%{local_py_sitedir}/gi -name GIMarshallingTests.py* -delete -print find %{buildroot}%{_prefix} -name GIMarshallingTests.py* -delete -print
rm examples/Makefile* rm examples/Makefile*
%fdupes $RPM_BUILD_ROOT find %{buildroot} -name '*.la' -or -name '*.a' | xargs rm -f
%clean %fdupes %{buildroot}
rm -rf $RPM_BUILD_ROOT
%files %files %{python_files}
%defattr(-,root,root) %defattr(-,root,root)
%doc AUTHORS NEWS README ChangeLog examples %doc AUTHORS COPYING ChangeLog NEWS README
%{local_py_sitedir}/gi/ %doc examples/
%{local_py_sitedir}/*.egg-info %{python_sitearch}/gi/
%{python_sitearch}/*.egg-info
# Lives in cairo subpackage # Lives in cairo subpackage
%exclude %{local_py_sitedir}/gi/_gi_cairo*.so %exclude %{python_sitearch}/gi/_gi_cairo*.so
%exclude %{local_py_sitedir}/gi/overrides/Gdk.* # Lives in Gdk subpackage
%exclude %{local_py_sitedir}/gi/overrides/Gtk.* %exclude %{python_sitearch}/gi/overrides/Gdk.*
%exclude %{local_py_sitedir}/gi/overrides/keysyms.* %exclude %{python_sitearch}/gi/overrides/Gtk.*
%exclude %{local_py_sitedir}/gi/overrides/Pango.py %exclude %{python_sitearch}/gi/overrides/keysyms.*
%exclude %{python_sitearch}/gi/overrides/Pango.*
%files Gdk %files %{python_files Gdk}
%defattr(-,root,root) %defattr(-,root,root)
%{local_py_sitedir}/gi/overrides/Gdk.* %doc AUTHORS COPYING
%{local_py_sitedir}/gi/overrides/Gtk.* %{python_sitearch}/gi/overrides/Gdk.*
%{local_py_sitedir}/gi/overrides/keysyms.* %{python_sitearch}/gi/overrides/Gtk.*
%{local_py_sitedir}/gi/overrides/Pango.py %{python_sitearch}/gi/overrides/keysyms.*
%{python_sitearch}/gi/overrides/Pango.*
%files cairo %files %{python_files cairo}
%defattr(-,root,root) %defattr(-,root,root)
%{local_py_sitedir}/gi/_gi_cairo*.so %doc AUTHORS COPYING
%{python_sitearch}/gi/_gi_cairo*.so
%if ! %{build_for_python3} %files %{python_files devel}
%files devel
%defattr(-,root,root) %defattr(-,root,root)
%doc AUTHORS COPYING
%files -n %{name}-common-devel
%defattr(-,root,root)
%doc AUTHORS COPYING
%{_includedir}/pygobject-3.0/ %{_includedir}/pygobject-3.0/
%{_libdir}/pkgconfig/pygobject-3.0.pc %{_libdir}/pkgconfig/pygobject-3.0.pc
%endif
%changelog %changelog

File diff suppressed because it is too large Load Diff

View File

@ -1,189 +0,0 @@
#
# spec file for package python3-gobject
#
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
# This figures in an error message
%global __requires_exclude typelib\\(%%namespaces\\)
%global __requires_exclude_from ^%{local_py_sitedir}/gi/__init__.py$
%define build_for_python3 1
%if %{build_for_python3}
%define local_py_requires Requires: python(abi) = %py3_ver
%define local_py_sitedir %{python3_sitearch}
%define local_py_suffix 3
%define local_py_pkg python3
%define local_lib_ver 3-0
%else
%define local_py_requires %{py_requires}
%define local_py_sitedir %{py_sitedir}
%define local_py_suffix 2
%define local_py_pkg python
%define local_lib_ver 2-0
%endif
Name: python3-gobject
%define _name pygobject
Summary: Python bindings for GObject
License: LGPL-2.1+
Group: Development/Libraries/Python
Version: 3.24.0
Release: 0
Url: https://wiki.gnome.org/Projects/PyGObject/
Source: http://download.gnome.org/sources/pygobject/3.24/%{_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.38.0
BuildRequires: gnome-common
BuildRequires: gobject-introspection-devel >= 1.46.0
BuildRequires: libffi-devel >= 3.0.0
%if %{build_for_python3}
BuildRequires: python3-cairo-devel
BuildRequires: python3-devel
%else
BuildRequires: python-cairo-devel
BuildRequires: python-devel
%endif
BuildRequires: pkgconfig(cairo)
BuildRequires: pkgconfig(cairo-gobject)
# Trigger an automatic installation of python(3)?-gobject when python and libgirepository are installed.
Supplements: packageand(%{local_py_pkg}:libgirepository-1_0-1)
%if %local_py_suffix == 2
Provides: python2-gobject = %{version}
%endif
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%{local_py_requires}
%description
Pygobjects is an extension module for python that gives you access to
GLib's GObjects.
%package Gdk
Summary: Python bindings for GObject -- Gdk bindings
Group: Development/Libraries/Python
Requires: %{name} = %{version}
Requires: %{name}-cairo = %{version}
%if %local_py_suffix == 2
Provides: python2-gobject-Gdk = %{version}
%endif
%define gdk_real_package %(rpm -q --qf '%%{NAME}' -f $(readlink /usr/lib64/libgdk-3.so -f))
Supplements: packageand(%{name}:%{gdk_real_package})
%description Gdk
Pygobjects is an extension module for python that gives you access to
GLib's GObjects.
This package contains the Python Gdk bindings for GObject.
%package cairo
Summary: Python bindings for GObject -- Cairo bindings
Group: Development/Libraries/Python
Requires: %{name} = %{version}
%if %local_py_suffix == 2
Provides: python2-gobject-cairo = %{version}
%endif
%define cairo_real_package %(rpm -q --qf '%%{NAME}' --whatprovides cairo)
Supplements: packageand(%{name}:%{cairo_real_package})
%description cairo
Pygobjects is an extension module for python that gives you access to
GLib's GObjects.
This package contains the Python Cairo bindings for GObject.
%if ! %{build_for_python3}
%package devel
Summary: Python bindings for GObject
Group: Development/Libraries/Python
Requires: %{name} = %{version}
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: python2-gobject-devel = %{version}
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}
%patch1 -p1
%build
autoreconf -fiv
%if %{build_for_python3}
export PYTHON=python3
%else
export PYTHON=python2
%endif
%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
# 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/
# Drop GIMarshallingTests - It's test suite remainders that should not be installed
find %{buildroot}%{local_py_sitedir}/gi -name GIMarshallingTests.py* -delete -print
rm examples/Makefile*
%fdupes $RPM_BUILD_ROOT
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root)
%doc AUTHORS NEWS README ChangeLog examples
%{local_py_sitedir}/gi/
%{local_py_sitedir}/*.egg-info
# Lives in cairo subpackage
%exclude %{local_py_sitedir}/gi/_gi_cairo*.so
%exclude %{local_py_sitedir}/gi/overrides/Gdk.*
%exclude %{local_py_sitedir}/gi/overrides/Gtk.*
%exclude %{local_py_sitedir}/gi/overrides/keysyms.*
%exclude %{local_py_sitedir}/gi/overrides/Pango.py
%files Gdk
%defattr(-,root,root)
%{local_py_sitedir}/gi/overrides/Gdk.*
%{local_py_sitedir}/gi/overrides/Gtk.*
%{local_py_sitedir}/gi/overrides/keysyms.*
%{local_py_sitedir}/gi/overrides/Pango.py
%files cairo
%defattr(-,root,root)
%{local_py_sitedir}/gi/_gi_cairo*.so
%if ! %{build_for_python3}
%files devel
%defattr(-,root,root)
%{_includedir}/pygobject-3.0/
%{_libdir}/pkgconfig/pygobject-3.0.pc
%endif
%changelog