pygobject3/pygobject3.spec

156 lines
4.5 KiB
RPMSpec
Raw Permalink Normal View History

2019-09-30 11:14:23 -04:00
%global with_python3 1
Name: pygobject3
2020-08-26 14:12:01 +08:00
Version: 3.36.1
2021-05-22 17:33:34 +08:00
Release: 2
2019-09-30 11:14:23 -04:00
Summary: Provides bindings for GObject based libraries
License: LGPLv2+ and MIT
URL: https://wiki.gnome.org/Projects/PyGObject
2020-08-26 14:12:01 +08:00
Source0: https://download.gnome.org/sources/pygobject/3.36/pygobject-%{version}.tar.xz
2019-09-30 11:14:23 -04:00
2021-05-22 17:33:34 +08:00
Patch9000: fix-test-failure-of-test_atoms-and-test_overrides_gtk.patch
2020-08-26 14:12:01 +08:00
BuildRequires: glib2-devel >= 2.48.0 gobject-introspection-devel >= 1.46.0
2019-09-30 11:14:23 -04:00
BuildRequires: meson cairo-gobject-devel python2-devel >= 2.7 python2-cairo-devel >= 1.11.1
2021-05-22 17:33:34 +08:00
BuildRequires: python2-pytest python3-pytest
2019-09-30 11:14:23 -04:00
%if 0%{?with_python3}
BuildRequires: python3-devel >= 3.4 python3-cairo-devel >= 1.11.1
%endif
%description
PyGObject is a Python package which provides bindings for GObject based libraries such as
GTK, GStreamer, WebKitGTK, GLib, GIO and many more.
PyGObject uses glib, gobject, girepository, libffi and other libraries to access the C
library (libgtk-3.so) in combination with the additional metadata from the accompanying
typelib file (Gtk-3.0.typelib) and dynamically provides a Python interface based on that information.
%package -n python2-gobject
%{?python_provide:%python_provide python2-gobject}
Summary: GObject library wrapper for python 2
Requires: python2-gobject-base%{?_isa} = %{version}-%{release}
Requires: python2-cairo%{?_isa} >= 1.11.1
Provides: %{name} = %{version}-%{release}
Provides: %{name}%{?_isa} = %{version}-%{release}
%description -n python2-gobject
The python-gobject package provides a convenient wrapper for the GObject
library and and other libraries that are compatible with GObject Introspection,
for use in Python 2 programs.
%package -n python2-gobject-base
%{?python_provide:%python_provide python2-gobject-base}
Summary: base package for python2-gobject package
Requires: gobject-introspection%{?_isa}
Provides: %{name}-base = %{version}-%{release}
Provides: %{name}-base%{?_isa} = %{version}-%{release}
%description -n python2-gobject-base
This package provides the non-cairo specific bits of the GObject Introspection
library.
%package -n python3-gobject
Summary: GObject library wrapper for python 3
Requires: python3-gobject-base%{?_isa} = %{version}-%{release}
Requires: python3-cairo%{?_isa}
%description -n python3-gobject
The python3-gobject package provides a convenient wrapper for the GObject
library and and other libraries that are compatible with GObject Introspection,
for use in Python 3 programs.
%package -n python3-gobject-base
Summary: base package for python3-gobject package
Requires: gobject-introspection%{?_isa}
%description -n python3-gobject-base
This package provides the non-cairo specific bits of the GObject Introspection
library.
%package devel
Summary: Development files for %{name}
Requires: python2-gobject%{?_isa} = %{version}-%{release}
%if 0%{?with_python3}
Requires: python3-gobject%{?_isa} = %{version}-%{release}
%endif
Requires: gobject-introspection-devel%{?_isa}
%description devel
This package contains files required to embed PyGObject
%prep
2020-08-26 14:12:01 +08:00
%autosetup -n pygobject-%{version} -p1
2019-09-30 11:14:23 -04:00
rm -rf %{py3dir}
cp -a . %{py3dir}
%build
%meson -Dpython=%{__python2}
%meson_build
pushd %{py3dir}
%meson -Dpython=%{__python3}
%meson_build
popd
%install
%meson_install
pushd %{py3dir}
%meson_install
popd
2021-05-22 17:33:34 +08:00
%check
%{__python2} setup.py test
%{__python3} setup.py test
2019-09-30 11:14:23 -04:00
%pre
%preun
%post
%postun
%files -n python2-gobject
%{python2_sitearch}/gi/_gi_cairo.so
%files -n python2-gobject-base
%license COPYING
%doc NEWS
%dir %{python2_sitearch}/gi
%{python2_sitearch}/gi/*
%{python2_sitearch}/pygtkcompat/
2020-08-26 14:12:01 +08:00
%{python2_sitearch}/PyGObject-*.egg-info
2019-09-30 11:14:23 -04:00
%exclude %{python2_sitearch}/gi/_gi_cairo.so
%files -n python3-gobject
%{python3_sitearch}/gi/_gi_cairo*.so
%files -n python3-gobject-base
%license COPYING
%doc NEWS
%dir %{python3_sitearch}/gi
%{python3_sitearch}/gi/*
%exclude %{python3_sitearch}/gi/_gi_cairo*.so
%{python3_sitearch}/pygtkcompat/
2020-08-26 14:12:01 +08:00
%{python3_sitearch}/PyGObject-*.egg-info
2019-09-30 11:14:23 -04:00
%files devel
%{_includedir}/pygobject-3.0/pygobject.h
%doc examples/
%dir %{_includedir}/pygobject-3.0/
%{_libdir}/pkgconfig/pygobject-3.0.pc
%changelog
2021-05-22 17:33:34 +08:00
* Sat May 22 2021 wangchen <wangchen137@huawei.com> - 3.36.1-2
- enable check test suite
2020-08-26 14:12:01 +08:00
* Wed Aug 26 2020 wangchen <wangchen137@huawei.com> - 3.36.1-1
- update to 3.36.1
2019-09-30 11:14:23 -04:00
* Fri Sep 20 2019 openEuler Buildteam <buildteam@openeuler.org> - 3.30.1-2
- Package init