[packages/python-pygobject3] - adapted to coexist with newer python3 module build from python3-pygobject3.spec; release 2
qboosh
qboosh at pld-linux.org
Thu Sep 17 21:47:17 CEST 2020
commit 20424bac3bdc63b3447ed6e4b8edd6d2923363dc
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Thu Sep 17 21:50:05 2020 +0200
- adapted to coexist with newer python3 module build from python3-pygobject3.spec; release 2
python-pygobject3.spec | 76 ++++++++++++++++++++++++++++----------------------
1 file changed, 43 insertions(+), 33 deletions(-)
---
diff --git a/python-pygobject3.spec b/python-pygobject3.spec
index 0c58a08..cd87b09 100644
--- a/python-pygobject3.spec
+++ b/python-pygobject3.spec
@@ -1,16 +1,19 @@
+# NOTE: for versions >= 3.38 (for python 3.5+) see python3-pygobject3.spec
#
# Conditional build:
+%bcond_with devel # common devel package (built from python3-pygobject3.spec)
%bcond_without python2 # Python 2.x module
-%bcond_without python3 # Python 3.x module
+%bcond_with python3 # Python 3.x module (built from python3-pygobject3.spec)
%bcond_without doc # Sphinx documentation
%bcond_with tests # unit tests (require DISPLAY)
%define module pygobject
-Summary: Python bindings for GObject library
-Summary(pl.UTF-8): Wiązania Pythona do biblioteki GObject
+Summary: Python 2 bindings for GObject library
+Summary(pl.UTF-8): Wiązania Pythona 2 do biblioteki GObject
Name: python-pygobject3
+# keep 3.36.x here for python2 support
Version: 3.36.1
-Release: 1
+Release: 2
License: LGPL v2+
Group: Libraries/Python
Source0: http://ftp.gnome.org/pub/GNOME/sources/pygobject/3.36/%{module}-%{version}.tar.xz
@@ -50,10 +53,28 @@ Conflicts: python-pygobject < 2.28.6-3
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
-Python bindings for GObject library.
+Python 2 bindings for GObject library.
%description -l pl.UTF-8
-Wiązania Pythona do biblioteki GObject.
+Wiązania Pythona 2 do biblioteki GObject.
+
+%package devel
+Summary: Python 2 bindings for GObject library - development metapackage
+Summary(pl.UTF-8): Wiązania Pythona 2 do biblioteki GObject - metapakiet programistyczny
+Group: Development/Languages/Python
+Requires: %{name} = %{version}-%{release}
+Requires: %{name}-common-devel >= %{version}-%{release}
+Requires: glib2-devel >= 1:2.48.0
+Requires: libffi-devel >= 3.0
+Requires: python-devel >= 1:2.7
+
+%description devel
+This metapackage gathers files required to develop GObject bindings
+for Python 2.
+
+%description devel -l pl.UTF-8
+Ten metapakiet gromadzi pliki wymagane do tworzenia wiązań biblioteki
+GObject dla Pythona 2.
%package common-devel
Summary: Python bindings for GObject library
@@ -73,37 +94,19 @@ Pakiet zawiera pliki nagłówkowe wymagane do zbudowania funkcji do
biblioteki GObject, tak by mogły te biblioteki kooperowaći z
wiązaniami Pythona.
-%package devel
-Summary: Python 2 bindings for GObject library - development metapackage
-Summary(pl.UTF-8): Wiązania Pythona 2 do biblioteki GObject - metapakiet programistyczny
-Group: Development/Languages/Python
-Requires: %{name} = %{version}-%{release}
-Requires: %{name}-common-devel = %{version}-%{release}
-Requires: glib2-devel >= 1:2.48.0
-Requires: libffi-devel >= 3.0
-Requires: python-devel >= 1:2.7
-
-%description devel
-This metapackage gathers files required to develop GObject bindings
-for Python 2.
-
-%description devel -l pl.UTF-8
-Ten metapakiet gromadzi pliki wymagane do tworzenia wiązań biblioteki
-GObject dla Pythona 2.
-
%package -n python3-pygobject3
-Summary: Python 3.x bindings for GObject library
-Summary(pl.UTF-8): Wiązania Pythona 3.x do biblioteki GObject
+Summary: Python 3 bindings for GObject library
+Summary(pl.UTF-8): Wiązania Pythona 3 do biblioteki GObject
Group: Libraries/Python
Requires: glib2 >= 1:2.48.0
Requires: gobject-introspection >= 1.46.0
Conflicts: python3-pygobject < 2.28.6-3
%description -n python3-pygobject3
-Python 3.x bindings for GObject library.
+Python 3 bindings for GObject library.
%description -n python3-pygobject3 -l pl.UTF-8
-Wiązania Pythona 3.x do biblioteki GObject.
+Wiązania Pythona 3 do biblioteki GObject.
%package -n python3-pygobject3-devel
Summary: Python 3 bindings for GObject library - development metapackage
@@ -127,7 +130,7 @@ GObject dla Pythona 3.
Summary: API documentation for Python GObject library
Summary(pl.UTF-8): Dokumentacja biblioteki Pythona GObject
Group: Documentation
-%if "%{_rpmversion}" >= "5"
+%if "%{_rpmversion}" >= "4.6"
BuildArch: noarch
%endif
@@ -142,7 +145,7 @@ Summary: Example programs for GObject library
Summary(pl.UTF-8): Programy przykładowe dla biblioteki GObject
Group: Development/Languages/Python
Requires: %{name}-devel = %{version}-%{release}
-%if "%{_rpmversion}" >= "5"
+%if "%{_rpmversion}" >= "4.6"
BuildArch: noarch
%endif
@@ -186,6 +189,11 @@ install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
cp -a examples/*.py $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
+%if %{without devel}
+%{__rm} -r $RPM_BUILD_ROOT%{_includedir}/pygobject-3.0
+%{__rm} $RPM_BUILD_ROOT%{_pkgconfigdir}/pygobject-3.0.pc
+%endif
+
%clean
rm -rf $RPM_BUILD_ROOT
@@ -205,13 +213,15 @@ rm -rf $RPM_BUILD_ROOT
%{py_sitedir}/pygtkcompat/*.py[co]
%{py_sitedir}/PyGObject-%{version}-py*.egg-info
+%files devel
+%defattr(644,root,root,755)
+%endif
+
+%if %{with devel}
%files common-devel
%defattr(644,root,root,755)
%{_includedir}/pygobject-3.0
%{_pkgconfigdir}/pygobject-3.0.pc
-
-%files devel
-%defattr(644,root,root,755)
%endif
%if %{with python3}
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/python-pygobject3.git/commitdiff/20424bac3bdc63b3447ed6e4b8edd6d2923363dc
More information about the pld-cvs-commit
mailing list