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
|
|
|
#
|
2022-04-25 09:26:06 +02:00
|
|
|
# Copyright (c) 2022 SUSE LLC
|
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.
|
|
|
|
|
2018-09-27 09:41:26 +02:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2011-01-18 00:30:10 +01:00
|
|
|
#
|
|
|
|
|
2012-02-10 17:19:03 +01:00
|
|
|
|
2017-05-10 12:14:47 +02:00
|
|
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
2021-08-04 11:48:27 +02:00
|
|
|
%define skip_python2 1
|
2021-01-18 14:16:18 +01:00
|
|
|
# Define these before the call of python_subpackages
|
|
|
|
%define introspection_real_package %(rpm -q --qf '%%{NAME}' -f $(readlink %{_libdir}/libgirepository-1.0.so -f))
|
|
|
|
%define cairo_real_package %(rpm -q --qf '%%{NAME}' --whatprovides cairo)
|
|
|
|
# Don't BuildRequire pkgconfig(gdk-3.0) to find the real package for libgdk-3!
|
|
|
|
# It produces a dependency cycle: avahi - gtk3-devel - python-dbus-python
|
|
|
|
#%%define gdk_real_package %%(rpm -q --qf '%%{NAME}' -f $(readlink %%{_libdir}/libgdk-3.so -f))
|
2015-03-19 15:32:50 +01:00
|
|
|
# This figures in an error message
|
|
|
|
%global __requires_exclude typelib\\(%%namespaces\\)
|
2021-01-14 14:39:46 +01:00
|
|
|
%global __requires_exclude_from ^%{_libdir}/python.*/site-packages/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
|
2022-08-04 08:49:14 +02:00
|
|
|
Version: 3.42.2
|
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/
|
2021-09-27 08:25:49 +02:00
|
|
|
Source0: https://download.gnome.org/sources/pygobject/3.42/%{_name}-%{version}.tar.xz
|
2019-04-18 15:17:27 +02:00
|
|
|
|
2017-05-10 12:14:47 +02:00
|
|
|
BuildRequires: %{python_module devel}
|
2021-08-04 11:48:27 +02:00
|
|
|
BuildRequires: %{python_module pycairo >= 1.16.0}
|
|
|
|
BuildRequires: %{python_module pycairo-devel}
|
2017-05-10 12:14:47 +02:00
|
|
|
BuildRequires: %{python_module setuptools}
|
2011-01-18 00:30:10 +01:00
|
|
|
BuildRequires: fdupes
|
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
|
2021-01-18 14:16:18 +01:00
|
|
|
# build cycle!
|
|
|
|
# BuildRequires: pkgconfig(gdk-3.0) >= 2.38.0
|
2017-11-02 14:51:20 +01:00
|
|
|
BuildRequires: pkgconfig(gobject-introspection-1.0) >= 1.46.0
|
2021-01-18 14:16:18 +01:00
|
|
|
# Trigger an automatic installation of python(2|3.*)-gobject when python and libgirepository are installed.
|
2022-04-25 09:26:06 +02:00
|
|
|
Supplements: (python and %{introspection_real_package})
|
2017-05-10 12:14:47 +02:00
|
|
|
%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
|
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}
|
2021-01-18 14:16:18 +01:00
|
|
|
# See above
|
2022-04-25 09:26:06 +02:00
|
|
|
#Supplements: (python-gobject and %{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
|
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}
|
2022-04-25 09:26:06 +02:00
|
|
|
Supplements: (python-gobject and %{cairo_real_package})
|
2022-06-09 16:59:21 +02:00
|
|
|
Requires: python-cairo
|
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
|
2021-03-24 17:39:21 +01:00
|
|
|
Requires: glib2-devel >= 2.56.0
|
|
|
|
Requires: gobject-introspection-devel >= 1.56.0
|
2017-05-10 12:14:47 +02:00
|
|
|
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-09-14 05:53:01 +02:00
|
|
|
# Remove the executable bits from example scripts:
|
2021-01-14 14:39:46 +01:00
|
|
|
find examples -name '*.py' -exec chmod -R -x {} +
|
2011-01-18 00:30:10 +01:00
|
|
|
|
|
|
|
%build
|
2018-09-14 05:53:01 +02:00
|
|
|
export CFLAGS="%{optflags}"
|
|
|
|
%python_build
|
2017-05-10 12:14:47 +02:00
|
|
|
|
2011-01-18 00:30:10 +01:00
|
|
|
%install
|
2018-09-14 05:53:01 +02:00
|
|
|
%python_install
|
2022-07-21 15:05:16 +02:00
|
|
|
# Incorrectly installed by a python38-setuptools vendored distutils
|
|
|
|
# which does not play well with the distro patched python38.
|
|
|
|
# Later flavors installed the correct files into lib64 as well
|
|
|
|
if [ "%{_libdir}" != "%{_prefix}/lib" -a -d %{buildroot}%{_prefix}/lib/pkgconfig ]; then
|
|
|
|
rm -r %{buildroot}%{_prefix}/lib/pkgconfig
|
|
|
|
fi
|
2017-05-10 12:14:47 +02:00
|
|
|
|
2021-01-18 14:16:18 +01:00
|
|
|
%{python_expand # delete unwanted python scripts and their compiled cache files
|
2018-03-09 11:02:53 +01:00
|
|
|
# Drop pygtkcompat layer - It's useless and we lack other stuff for it to work
|
2021-01-18 14:16:18 +01:00
|
|
|
rm -v %{buildroot}%{$python_sitearch}/gi/pygtkcompat.py*
|
|
|
|
rm -vf %{buildroot}%{$python_sitearch}/gi/__pycache__/pygtkcompat*
|
|
|
|
rm -vr %{buildroot}%{$python_sitearch}/pygtkcompat/
|
2017-05-10 12:14:47 +02:00
|
|
|
|
2016-04-18 16:34:34 +02:00
|
|
|
# Drop GIMarshallingTests - It's test suite remainders that should not be installed
|
2021-01-18 14:16:18 +01:00
|
|
|
find %{buildroot}%{$python_sitearch} -name GIMarshallingTests* -delete -print
|
|
|
|
}
|
2017-05-10 12:14:47 +02:00
|
|
|
|
2017-09-08 22:33:31 +02:00
|
|
|
find %{buildroot} "(" -name '*.la' -or -name '*.a' ")" -delete
|
2021-01-18 14:16:18 +01:00
|
|
|
|
|
|
|
%{?python_compileall}
|
|
|
|
%python_expand %fdupes %{buildroot}%{$python_sitearch}
|
|
|
|
|
2017-05-10 12:14:47 +02:00
|
|
|
%files %{python_files}
|
2018-03-09 11:02:53 +01:00
|
|
|
%license COPYING
|
2018-09-14 05:53:01 +02:00
|
|
|
%doc NEWS
|
|
|
|
%doc examples/
|
2017-05-10 12:14:47 +02:00
|
|
|
%{python_sitearch}/gi/
|
2019-04-18 15:17:27 +02: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
|
2018-09-14 05:53:01 +02:00
|
|
|
%exclude %{python_sitearch}/gi/_gtktemplate.py
|
2017-05-10 12:14:47 +02:00
|
|
|
%exclude %{python_sitearch}/gi/overrides/Gdk.*
|
2018-09-14 05:53:01 +02:00
|
|
|
%exclude %{python_sitearch}/gi/overrides/GdkPixbuf.py
|
2017-05-10 12:14:47 +02:00
|
|
|
%exclude %{python_sitearch}/gi/overrides/Gtk.*
|
|
|
|
%exclude %{python_sitearch}/gi/overrides/keysyms.*
|
|
|
|
%exclude %{python_sitearch}/gi/overrides/Pango.*
|
2021-01-18 14:16:18 +01:00
|
|
|
%pycache_only %exclude %{python_sitearch}/gi/__pycache__/_gtktemplate*
|
|
|
|
%pycache_only %exclude %{python_sitearch}/gi/overrides/__pycache__/Gdk.*
|
|
|
|
%pycache_only %exclude %{python_sitearch}/gi/overrides/__pycache__/GdkPixbuf.*
|
|
|
|
%pycache_only %exclude %{python_sitearch}/gi/overrides/__pycache__/Gtk.*
|
|
|
|
%pycache_only %exclude %{python_sitearch}/gi/overrides/__pycache__/keysyms.*
|
|
|
|
%pycache_only %exclude %{python_sitearch}/gi/overrides/__pycache__/Pango.*
|
2017-05-10 12:14:47 +02:00
|
|
|
|
|
|
|
%files %{python_files Gdk}
|
2018-09-14 05:53:01 +02:00
|
|
|
%{python_sitearch}/gi/_gtktemplate.py
|
2017-05-10 12:14:47 +02:00
|
|
|
%{python_sitearch}/gi/overrides/Gdk.*
|
2018-09-14 05:53:01 +02:00
|
|
|
%{python_sitearch}/gi/overrides/GdkPixbuf.py
|
2017-05-10 12:14:47 +02:00
|
|
|
%{python_sitearch}/gi/overrides/Gtk.*
|
|
|
|
%{python_sitearch}/gi/overrides/keysyms.*
|
|
|
|
%{python_sitearch}/gi/overrides/Pango.*
|
2021-01-18 14:16:18 +01:00
|
|
|
%pycache_only %{python_sitearch}/gi/__pycache__/_gtktemplate*
|
|
|
|
%pycache_only %{python_sitearch}/gi/overrides/__pycache__/Gdk.*
|
|
|
|
%pycache_only %{python_sitearch}/gi/overrides/__pycache__/GdkPixbuf.*
|
|
|
|
%pycache_only %{python_sitearch}/gi/overrides/__pycache__/Gtk.*
|
|
|
|
%pycache_only %{python_sitearch}/gi/overrides/__pycache__/keysyms.*
|
|
|
|
%pycache_only %{python_sitearch}/gi/overrides/__pycache__/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-09-14 05:53:01 +02:00
|
|
|
%doc README.rst
|
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
|