| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| %{?!python_module:%define python_module() python-%{**} python3-%{**}} |
| %define skip_python2 1 |
| |
| %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) |
| |
| |
| |
| |
| %global __requires_exclude typelib\\(%%namespaces\\) |
| %global __requires_exclude_from ^%{_libdir}/python.*/site-packages/gi/__init__.py$ |
| %define _name pygobject |
| Name: python-gobject |
| Version: 3.42.2 |
| Release: 0 |
| Summary: Python bindings for GObject |
| License: LGPL-2.1-or-later |
| Group: Development/Languages/Python |
| URL: https://wiki.gnome.org/Projects/PyGObject/ |
| Source0: https://download.gnome.org/sources/pygobject/3.42/%{_name}-%{version}.tar.xz |
| |
| BuildRequires: %{python_module devel} |
| BuildRequires: %{python_module pycairo >= 1.16.0} |
| BuildRequires: %{python_module pycairo-devel} |
| BuildRequires: %{python_module setuptools} |
| BuildRequires: fdupes |
| BuildRequires: pkgconfig |
| BuildRequires: python-rpm-macros |
| BuildRequires: pkgconfig(cairo) |
| BuildRequires: pkgconfig(cairo-gobject) |
| 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 |
| |
| Supplements: (python and %{introspection_real_package}) |
| %python_subpackages |
| |
| %description |
| Pygobjects is an extension module for python that gives you access to |
| GLib's GObjects. |
| |
| %package Gdk |
| Summary: Python bindings for GObject/Gdk |
| Group: Development/Languages/Python |
| Requires: %{name} = %{version} |
| Requires: %{name}-cairo = %{version} |
| |
| |
| |
| %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 |
| Group: Development/Languages/Python |
| Requires: %{name} = %{version} |
| Supplements: (python-gobject and %{cairo_real_package}) |
| Requires: python-cairo |
| |
| %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 |
| Summary: Metapackage to pull in all of python-gobject's packages |
| Group: Development/Languages/Python |
| Requires: %{name} = %{version} |
| Requires: %{name}-Gdk = %{version} |
| Requires: %{name}-cairo = %{version} |
| Requires: %{name}-common-devel = %{version} |
| Requires: python-devel |
| |
| %description devel |
| This package contains files required to build wrappers for gobject |
| addon libraries such as pygtk. |
| |
| %package -n %{name}-common-devel |
| Summary: Shared development files for GObject's Python bindings |
| Group: Development/Languages/Python |
| Requires: glib2-devel >= 2.56.0 |
| Requires: gobject-introspection-devel >= 1.56.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 |
| %setup -q -n %{_name}-%{version} |
| |
| find examples -name '*.py' -exec chmod -R -x {} + |
| |
| %build |
| export CFLAGS="%{optflags}" |
| %python_build |
| |
| %install |
| %python_install |
| |
| |
| |
| if [ "%{_libdir}" != "%{_prefix}/lib" -a -d %{buildroot}%{_prefix}/lib/pkgconfig ]; then |
| rm -r %{buildroot}%{_prefix}/lib/pkgconfig |
| fi |
| |
| %{python_expand # delete unwanted python scripts and their compiled cache files |
| # Drop pygtkcompat layer - It's useless and we lack other stuff for it to work |
| rm -v %{buildroot}%{$python_sitearch}/gi/pygtkcompat.py* |
| rm -vf %{buildroot}%{$python_sitearch}/gi/__pycache__/pygtkcompat* |
| rm -vr %{buildroot}%{$python_sitearch}/pygtkcompat/ |
| |
| |
| find %{buildroot}%{$python_sitearch} -name GIMarshallingTests* -delete -print |
| } |
| |
| find %{buildroot} "(" -name '*.la' -or -name '*.a' ")" -delete |
| |
| %{?python_compileall} |
| %python_expand %fdupes %{buildroot}%{$python_sitearch} |
| |
| %files %{python_files} |
| %license COPYING |
| %doc NEWS |
| %doc examples/ |
| %{python_sitearch}/gi/ |
| %{python_sitearch}/PyGObject-%{version}*-py*.egg-info |
| |
| %exclude %{python_sitearch}/gi/_gi_cairo*.so |
| |
| %exclude %{python_sitearch}/gi/_gtktemplate.py |
| %exclude %{python_sitearch}/gi/overrides/Gdk.* |
| %exclude %{python_sitearch}/gi/overrides/GdkPixbuf.py |
| %exclude %{python_sitearch}/gi/overrides/Gtk.* |
| %exclude %{python_sitearch}/gi/overrides/keysyms.* |
| %exclude %{python_sitearch}/gi/overrides/Pango.* |
| %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.* |
| |
| %files %{python_files Gdk} |
| %{python_sitearch}/gi/_gtktemplate.py |
| %{python_sitearch}/gi/overrides/Gdk.* |
| %{python_sitearch}/gi/overrides/GdkPixbuf.py |
| %{python_sitearch}/gi/overrides/Gtk.* |
| %{python_sitearch}/gi/overrides/keysyms.* |
| %{python_sitearch}/gi/overrides/Pango.* |
| %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.* |
| |
| %files %{python_files cairo} |
| %{python_sitearch}/gi/_gi_cairo*.so |
| |
| %files %{python_files devel} |
| %doc README.rst |
| |
| %files -n %{name}-common-devel |
| %{_includedir}/pygobject-3.0/ |
| %{_libdir}/pkgconfig/pygobject-3.0.pc |
| |
| %changelog |