diff --git a/python-gobject.changes b/python-gobject.changes index 7baddfd..c8805fd 100644 --- a/python-gobject.changes +++ b/python-gobject.changes @@ -1,3 +1,14 @@ +------------------------------------------------------------------- +Fri Sep 30 08:08:28 UTC 2011 - vuntz@opensuse.org + +- Update python3-gobject packaging: + + Use %{python3_sitearch} now that it's defined, instead of our + own custom macro. + + Change python3 Requires to python(abi) = %py3_ver, which is + saner. + + Do not use wrong libpyglib-gi-2_0-python0 subpackage name for + the library, but libpyglib-gi-2_0-python3-0, thanks to macros. + ------------------------------------------------------------------- Wed Sep 21 11:53:46 UTC 2011 - vuntz@opensuse.org diff --git a/python-gobject.spec b/python-gobject.spec index c09355e..561b352 100644 --- a/python-gobject.spec +++ b/python-gobject.spec @@ -20,11 +20,15 @@ %define build_for_python3 0 %if %{build_for_python3} -%define local_py_requires Requires: python3 -%define local_py_sitedir %{_libdir}/python3.1/site-packages +%define local_py_requires Requires: python(abi) = %py3_ver +%define local_py_sitedir %{python3_sitearch} +%define local_py_suffix 3 +%define local_lib_ver 3-0 %else %define local_py_requires %{py_requires} %define local_py_sitedir %{py_sitedir} +%define local_py_suffix %{nil} +%define local_lib_ver 0 %endif Name: python-gobject @@ -70,11 +74,11 @@ GLib's GObjects. This package contains the Python Cairo bindings for GObject. -%package -n libpyglib-gi-2_0-python0 +%package -n libpyglib-gi-2_0-python%{local_lib_ver} Summary: Python Gobject Introspeciton binding Group: System/Libraries -%description -n libpyglib-gi-2_0-python0 +%description -n libpyglib-gi-2_0-python%{local_lib_ver} Pygobjects is an extension module for python that gives you access to GLib's GObjects. @@ -85,7 +89,7 @@ License: LGPLv2.1+ Summary: Python bindings for GObject Group: Development/Libraries/Python Requires: %{name} = %{version} -Requires: libpyglib-gi-2_0-python0 = %{version} +Requires: libpyglib-gi-2_0-python%{local_lib_ver} = %{version} %if %{build_for_python3} # Several files are conflicting between python2 and python3 builds Conflicts: python-gobject-devel @@ -114,9 +118,9 @@ rm examples/Makefile* %clean rm -rf $RPM_BUILD_ROOT -%post -n libpyglib-gi-2_0-python0 -p /sbin/ldconfig +%post -n libpyglib-gi-2_0-python%{local_lib_ver} -p /sbin/ldconfig -%postun -n libpyglib-gi-2_0-python0 -p /sbin/ldconfig +%postun -n libpyglib-gi-2_0-python%{local_lib_ver} -p /sbin/ldconfig %files %defattr(-,root,root) @@ -125,9 +129,9 @@ rm -rf $RPM_BUILD_ROOT # Live in cairo subpackage %exclude %{local_py_sitedir}/gi/_gi_cairo.so -%files -n libpyglib-gi-2_0-python0 +%files -n libpyglib-gi-2_0-python%{local_lib_ver} %defattr(-, root, root) -%{_libdir}/libpyglib-gi-2.0-python.so.0* +%{_libdir}/libpyglib-gi-2.0-python%{local_py_suffix}.so.0* %files cairo %defattr(-,root,root) diff --git a/python3-gobject.changes b/python3-gobject.changes index 7baddfd..c8805fd 100644 --- a/python3-gobject.changes +++ b/python3-gobject.changes @@ -1,3 +1,14 @@ +------------------------------------------------------------------- +Fri Sep 30 08:08:28 UTC 2011 - vuntz@opensuse.org + +- Update python3-gobject packaging: + + Use %{python3_sitearch} now that it's defined, instead of our + own custom macro. + + Change python3 Requires to python(abi) = %py3_ver, which is + saner. + + Do not use wrong libpyglib-gi-2_0-python0 subpackage name for + the library, but libpyglib-gi-2_0-python3-0, thanks to macros. + ------------------------------------------------------------------- Wed Sep 21 11:53:46 UTC 2011 - vuntz@opensuse.org diff --git a/python3-gobject.spec b/python3-gobject.spec index 9875a2a..197a631 100644 --- a/python3-gobject.spec +++ b/python3-gobject.spec @@ -20,11 +20,15 @@ %define build_for_python3 1 %if %{build_for_python3} -%define local_py_requires Requires: python3 -%define local_py_sitedir %{_libdir}/python3.1/site-packages +%define local_py_requires Requires: python(abi) = %py3_ver +%define local_py_sitedir %{python3_sitearch} +%define local_py_suffix 3 +%define local_lib_ver 3-0 %else %define local_py_requires %{py_requires} %define local_py_sitedir %{py_sitedir} +%define local_py_suffix %{nil} +%define local_lib_ver 0 %endif Name: python3-gobject @@ -70,11 +74,11 @@ GLib's GObjects. This package contains the Python Cairo bindings for GObject. -%package -n libpyglib-gi-2_0-python0 +%package -n libpyglib-gi-2_0-python%{local_lib_ver} Summary: Python Gobject Introspeciton binding Group: System/Libraries -%description -n libpyglib-gi-2_0-python0 +%description -n libpyglib-gi-2_0-python%{local_lib_ver} Pygobjects is an extension module for python that gives you access to GLib's GObjects. @@ -85,7 +89,7 @@ License: LGPLv2.1+ Summary: Python bindings for GObject Group: Development/Libraries/Python Requires: %{name} = %{version} -Requires: libpyglib-gi-2_0-python0 = %{version} +Requires: libpyglib-gi-2_0-python%{local_lib_ver} = %{version} %if %{build_for_python3} # Several files are conflicting between python2 and python3 builds Conflicts: python-gobject-devel @@ -114,9 +118,9 @@ rm examples/Makefile* %clean rm -rf $RPM_BUILD_ROOT -%post -n libpyglib-gi-2_0-python0 -p /sbin/ldconfig +%post -n libpyglib-gi-2_0-python%{local_lib_ver} -p /sbin/ldconfig -%postun -n libpyglib-gi-2_0-python0 -p /sbin/ldconfig +%postun -n libpyglib-gi-2_0-python%{local_lib_ver} -p /sbin/ldconfig %files %defattr(-,root,root) @@ -125,9 +129,9 @@ rm -rf $RPM_BUILD_ROOT # Live in cairo subpackage %exclude %{local_py_sitedir}/gi/_gi_cairo.so -%files -n libpyglib-gi-2_0-python0 +%files -n libpyglib-gi-2_0-python%{local_lib_ver} %defattr(-, root, root) -%{_libdir}/libpyglib-gi-2.0-python.so.0* +%{_libdir}/libpyglib-gi-2.0-python%{local_py_suffix}.so.0* %files cairo %defattr(-,root,root)