2011-01-18 00:30:10 +01:00
|
|
|
#
|
2011-01-18 00:30:18 +01:00
|
|
|
# spec file for package python-gobject
|
2011-01-18 00:30:10 +01:00
|
|
|
#
|
2018-03-09 11:02:53 +01:00
|
|
|
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
|
2011-01-18 00:30:10 +01:00
|
|
|
#
|
|
|
|
# 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/
|
|
|
|
#
|
|
|
|
|
2012-02-10 17:19:03 +01:00
|
|
|
|
2017-05-10 12:14:47 +02:00
|
|
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
2015-03-19 15:32:50 +01:00
|
|
|
# This figures in an error message
|
|
|
|
%global __requires_exclude typelib\\(%%namespaces\\)
|
2017-05-18 22:21:56 +02:00
|
|
|
%global __requires_exclude_from ^%{python2_sitearch}/gi/__init__.py|%{python3_sitearch}/gi/__init__.py$
|
2011-06-24 10:50:51 +02:00
|
|
|
%define _name pygobject
|
2018-03-09 11:02:53 +01:00
|
|
|
Name: python-gobject
|
2018-03-22 15:11:55 +01:00
|
|
|
Version: 3.28.1
|
2018-03-09 11:02:53 +01:00
|
|
|
Release: 0
|
2011-01-18 00:30:10 +01:00
|
|
|
Summary: Python bindings for GObject
|
2018-03-09 11:02:53 +01:00
|
|
|
License: LGPL-2.1-or-later
|
2017-09-08 22:33:31 +02:00
|
|
|
Group: Development/Languages/Python
|
2018-03-09 11:02:53 +01:00
|
|
|
URL: https://wiki.gnome.org/Projects/PyGObject/
|
2018-03-13 09:17:27 +01:00
|
|
|
Source: http://download.gnome.org/sources/pygobject/3.28/%{_name}-%{version}.tar.xz
|
2014-02-20 21:02:56 +01:00
|
|
|
# PATCH-FIX-UPSTREAM pycompile-searchpath.patch jmatejek@suse.com -- Fix build with python 3.4
|
2018-03-09 11:02:53 +01:00
|
|
|
Patch0: pycompile-searchpath.patch
|
2017-08-31 09:42:58 +02:00
|
|
|
BuildRequires: %{python_module cairo >= 1.11.1}
|
2017-05-10 12:14:47 +02:00
|
|
|
BuildRequires: %{python_module cairo-devel}
|
|
|
|
BuildRequires: %{python_module devel}
|
|
|
|
BuildRequires: %{python_module setuptools}
|
2011-01-18 00:30:10 +01:00
|
|
|
BuildRequires: fdupes
|
2017-02-22 21:41:35 +01:00
|
|
|
BuildRequires: gnome-common
|
2018-03-09 11:02:53 +01:00
|
|
|
BuildRequires: pkgconfig
|
2017-05-10 12:14:47 +02:00
|
|
|
BuildRequires: python-rpm-macros
|
2012-10-19 08:50:52 +02:00
|
|
|
BuildRequires: pkgconfig(cairo)
|
|
|
|
BuildRequires: pkgconfig(cairo-gobject)
|
2017-11-02 14:51:20 +01:00
|
|
|
BuildRequires: pkgconfig(gio-2.0) >= 2.38.0
|
|
|
|
BuildRequires: pkgconfig(glib-2.0) >= 2.38.0
|
|
|
|
BuildRequires: pkgconfig(gobject-introspection-1.0) >= 1.46.0
|
2013-04-05 07:31:23 +02:00
|
|
|
# Trigger an automatic installation of python(3)?-gobject when python and libgirepository are installed.
|
2017-05-10 12:14:47 +02:00
|
|
|
Supplements: packageand(python:%{gdk_real_package})
|
|
|
|
%python_subpackages
|
2011-01-18 00:30:10 +01:00
|
|
|
|
|
|
|
%description
|
|
|
|
Pygobjects is an extension module for python that gives you access to
|
|
|
|
GLib's GObjects.
|
|
|
|
|
2016-04-15 11:36:47 +02:00
|
|
|
%package Gdk
|
2018-03-09 11:02:53 +01:00
|
|
|
%define gdk_real_package %(rpm -q --qf '%%{NAME}' -f $(readlink %{_libdir}/libgdk-3.so -f))
|
2017-09-08 22:33:31 +02:00
|
|
|
Summary: Python bindings for GObject/Gdk
|
|
|
|
Group: Development/Languages/Python
|
2016-04-15 11:36:47 +02:00
|
|
|
Requires: %{name} = %{version}
|
|
|
|
Requires: %{name}-cairo = %{version}
|
2017-05-10 12:14:47 +02:00
|
|
|
Supplements: packageand(python-gobject:%{gdk_real_package})
|
2016-04-15 11:36:47 +02:00
|
|
|
|
|
|
|
%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.
|
|
|
|
|
2011-01-18 00:30:10 +01:00
|
|
|
%package cairo
|
2018-03-09 11:02:53 +01:00
|
|
|
%define cairo_real_package %(rpm -q --qf '%%{NAME}' --whatprovides cairo)
|
2017-09-08 22:33:31 +02:00
|
|
|
Summary: Python bindings for GObject/Cairo
|
|
|
|
Group: Development/Languages/Python
|
2011-01-18 00:30:10 +01:00
|
|
|
Requires: %{name} = %{version}
|
2017-05-10 12:14:47 +02:00
|
|
|
Supplements: packageand(python-gobject:%{cairo_real_package})
|
2011-01-18 00:30:10 +01:00
|
|
|
|
|
|
|
%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.
|
|
|
|
|
|
|
|
%package devel
|
2017-09-08 22:33:31 +02:00
|
|
|
Summary: Metapackage to pull in all of python-gobject's packages
|
|
|
|
Group: Development/Languages/Python
|
2011-06-24 10:50:51 +02:00
|
|
|
Requires: %{name} = %{version}
|
2017-05-10 12:14:47 +02:00
|
|
|
Requires: %{name}-Gdk = %{version}
|
|
|
|
Requires: %{name}-cairo = %{version}
|
|
|
|
Requires: %{name}-common-devel = %{version}
|
|
|
|
Requires: python-devel
|
2011-01-18 00:30:10 +01:00
|
|
|
|
|
|
|
%description devel
|
|
|
|
This package contains files required to build wrappers for gobject
|
|
|
|
addon libraries such as pygtk.
|
2017-05-10 12:14:47 +02:00
|
|
|
|
|
|
|
%package -n %{name}-common-devel
|
2017-09-08 22:33:31 +02:00
|
|
|
Summary: Shared development files for GObject's Python bindings
|
|
|
|
Group: Development/Languages/Python
|
2017-05-10 12:14:47 +02:00
|
|
|
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.
|
|
|
|
|
2011-01-18 00:30:10 +01:00
|
|
|
%prep
|
|
|
|
%setup -q -n %{_name}-%{version}
|
2018-03-09 11:02:53 +01:00
|
|
|
%patch0 -p1
|
|
|
|
# Remove the executable bit from example scripts:
|
|
|
|
chmod -R -x examples/*.py
|
2011-01-18 00:30:10 +01:00
|
|
|
|
|
|
|
%build
|
2017-02-22 21:41:35 +01:00
|
|
|
autoreconf -fiv
|
2017-05-10 12:14:47 +02:00
|
|
|
|
|
|
|
# We want to do an out-of-source build
|
|
|
|
%define _configure ../configure
|
|
|
|
|
2018-03-09 11:02:53 +01:00
|
|
|
%{python_expand mkdir build_%{$python_bin_suffix}
|
|
|
|
pushd build_%{$python_bin_suffix}
|
2017-05-10 12:14:47 +02:00
|
|
|
|
|
|
|
export PYTHON=$python
|
|
|
|
%configure
|
2018-03-09 11:02:53 +01:00
|
|
|
%make_build
|
2011-01-18 00:30:10 +01:00
|
|
|
|
2017-05-10 12:14:47 +02:00
|
|
|
popd
|
|
|
|
}
|
|
|
|
|
2011-01-18 00:30:10 +01:00
|
|
|
%install
|
2018-03-09 11:02:53 +01:00
|
|
|
%{python_expand pushd build_%{$python_bin_suffix}
|
2017-05-10 12:14:47 +02:00
|
|
|
|
|
|
|
%make_install
|
|
|
|
|
|
|
|
popd
|
|
|
|
}
|
|
|
|
|
2018-03-09 11:02:53 +01:00
|
|
|
# Drop pygtkcompat layer - It's useless and we lack other stuff for it to work
|
2017-05-10 12:14:47 +02:00
|
|
|
%python_expand rm %{buildroot}%{$python_sitearch}/gi/pygtkcompat.py*
|
|
|
|
%python_expand rm -r %{buildroot}%{$python_sitearch}/pygtkcompat/
|
|
|
|
|
2016-04-18 16:34:34 +02:00
|
|
|
# Drop GIMarshallingTests - It's test suite remainders that should not be installed
|
2017-05-10 12:14:47 +02:00
|
|
|
find %{buildroot}%{_prefix} -name GIMarshallingTests.py* -delete -print
|
|
|
|
|
2011-01-18 00:30:10 +01:00
|
|
|
rm examples/Makefile*
|
2017-09-08 22:33:31 +02:00
|
|
|
find %{buildroot} "(" -name '*.la' -or -name '*.a' ")" -delete
|
|
|
|
%fdupes %{buildroot}/%{_prefix}
|
2011-01-18 00:30:10 +01:00
|
|
|
|
2017-05-10 12:14:47 +02:00
|
|
|
%files %{python_files}
|
2018-03-09 11:02:53 +01:00
|
|
|
%license COPYING
|
|
|
|
%doc examples/ NEWS README.rst
|
2017-05-10 12:14:47 +02:00
|
|
|
%{python_sitearch}/gi/
|
2018-03-09 11:02:53 +01:00
|
|
|
%{python_sitearch}/pygobject-%{version}-py*.egg-info
|
2012-03-26 11:05:11 +02:00
|
|
|
# Lives in cairo subpackage
|
2017-05-10 12:14:47 +02:00
|
|
|
%exclude %{python_sitearch}/gi/_gi_cairo*.so
|
|
|
|
# Lives in Gdk subpackage
|
|
|
|
%exclude %{python_sitearch}/gi/overrides/Gdk.*
|
|
|
|
%exclude %{python_sitearch}/gi/overrides/Gtk.*
|
|
|
|
%exclude %{python_sitearch}/gi/overrides/keysyms.*
|
|
|
|
%exclude %{python_sitearch}/gi/overrides/Pango.*
|
|
|
|
|
|
|
|
%files %{python_files Gdk}
|
|
|
|
%{python_sitearch}/gi/overrides/Gdk.*
|
|
|
|
%{python_sitearch}/gi/overrides/Gtk.*
|
|
|
|
%{python_sitearch}/gi/overrides/keysyms.*
|
|
|
|
%{python_sitearch}/gi/overrides/Pango.*
|
2016-04-15 11:36:47 +02:00
|
|
|
|
2017-05-10 12:14:47 +02:00
|
|
|
%files %{python_files cairo}
|
|
|
|
%{python_sitearch}/gi/_gi_cairo*.so
|
2011-01-18 00:30:10 +01:00
|
|
|
|
2017-05-10 12:14:47 +02:00
|
|
|
%files %{python_files devel}
|
2018-03-09 11:02:53 +01:00
|
|
|
%doc ChangeLog
|
2011-01-18 00:30:10 +01:00
|
|
|
|
2017-05-10 12:14:47 +02:00
|
|
|
%files -n %{name}-common-devel
|
2013-04-05 07:31:23 +02:00
|
|
|
%{_includedir}/pygobject-3.0/
|
2011-08-19 15:21:58 +02:00
|
|
|
%{_libdir}/pkgconfig/pygobject-3.0.pc
|
2011-01-18 00:30:10 +01:00
|
|
|
|
|
|
|
%changelog
|