diff --git a/0001-Move-python-modules-to-architecture-specific-directo.patch b/0001-Move-python-modules-to-architecture-specific-directo.patch new file mode 100644 index 0000000..21c84d1 --- /dev/null +++ b/0001-Move-python-modules-to-architecture-specific-directo.patch @@ -0,0 +1,53 @@ +From 4953f89845a55bddd21df1b505301b884ab2809a Mon Sep 17 00:00:00 2001 +From: Colin Walters +Date: Tue, 18 Mar 2014 16:04:23 -0400 +Subject: [PATCH] Move python modules to architecture-specific directory + +This is because dbus-python gets dragged in as a dependency of other +things people want to be multilib-compatible. As is the Python +modules conflict. +--- + Makefile.am | 9 +++++---- + 1 file changed, 5 insertions(+), 4 deletions(-) + +diff --git a/Makefile.am b/Makefile.am +index ebc2e43..1a14da4 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -17,7 +17,8 @@ EXTRA_DIST = \ + + # === dbus package === + +-nobase_python_PYTHON = \ ++dbuspydir = $(pyexecdir) ++nobase_dbuspy_DATA = \ + dbus/bus.py \ + dbus/connection.py \ + dbus/_compat.py \ +@@ -38,12 +39,12 @@ nobase_python_PYTHON = \ + dbus/types.py + + if !HAVE_PYTHON_3 +-nobase_python_PYTHON += \ ++nobase_dbuspy_DATA += \ + dbus/gobject_service.py \ + $(NULL) + endif + +-check_py_sources = $(nobase_python_PYTHON) ++check_py_sources = $(nobase_dbuspy_DATA) + include $(top_srcdir)/tools/check-coding-style.mk + + # === Devel stuff === +@@ -130,7 +131,7 @@ _dbus_glib_bindings/_dbus_glib_bindings.la: + + APIDOC_PYTHONPATH = $(abs_top_srcdir):$(abs_top_builddir)/_dbus_bindings/.libs:$(abs_top_builddir)/_dbus_glib_bindings/.libs + +-api api/index.html: $(nobase_python_PYTHON) \ ++api api/index.html: $(nobase_dbuspy_DATA) \ + _dbus_bindings/_dbus_bindings.la \ + _dbus_glib_bindings/_dbus_glib_bindings.la + rm -rf api +-- +1.8.3.1 + diff --git a/dbus-python.spec b/dbus-python.spec index 9e2662a..83aa69b 100644 --- a/dbus-python.spec +++ b/dbus-python.spec @@ -11,6 +11,8 @@ Source1: http://dbus.freedesktop.org/releases/dbus-python/%{name}-%{version}.tar # Added functionality for Fedora server dbus api requested by sgallagh # https://bugs.freedesktop.org/show_bug.cgi?id=26903#c9 Patch0: object_manager.patch +# borrow centos7 patch to use sitearch properly +Patch2: 0001-Move-python-modules-to-architecture-specific-directo.patch BuildRequires: dbus-devel BuildRequires: dbus-glib-devel @@ -43,8 +45,10 @@ Summary: D-Bus bindings for python3 %prep %setup -q -%patch0 -p1 -# For new arches (aarch64/ppc64le) +%patch0 -p1 -b .object_manager +%patch2 -p1 -b .sitearch + +# For new arches (aarch64/ppc64le), and patch2 autoreconf -vif @@ -67,8 +71,8 @@ make install DESTDIR=$RPM_BUILD_ROOT -C python3-build make install DESTDIR=$RPM_BUILD_ROOT -C python2-build # unpackaged files -rm -fv $RPM_BUILDROOT%{python2_sitearch}/*.la -rm -fv $RPM_BUILDROOT%{python3_sitearch}/*.la +rm -fv $RPM_BUILD_ROOT%{python2_sitearch}/*.la +rm -fv $RPM_BUILD_ROOT%{python3_sitearch}/*.la rm -rfv $RPM_BUILD_ROOT%{_datadir}/doc/dbus-python/ @@ -80,7 +84,7 @@ make check -k -C python3-build %files %doc COPYING NEWS %{python2_sitearch}/*.so -%{python2_sitelib}/dbus/ +%{python2_sitearch}/dbus/ %files devel %doc README ChangeLog doc/API_CHANGES.txt doc/HACKING.txt doc/tutorial.txt @@ -90,11 +94,12 @@ make check -k -C python3-build %files -n python3-dbus %doc COPYING %{python3_sitearch}/*.so -%{python3_sitelib}/dbus/ +%{python3_sitearch}/dbus/ %changelog * Thu Nov 06 2014 Rex Dieter 1.2.0-7 +- python2_sitelib should be python2_sitearch (#1161121) - update URL, s/python/python2/ a bit * Sat Aug 16 2014 Fedora Release Engineering - 1.2.0-6