From 42cd31943fb2463b5e51003a5729d0e42ea262a3 Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Thu, 6 Nov 2014 10:44:05 -0600 Subject: [PATCH] try to determine dbus-python install paths dynamically (#1161121) --- python-qt5.spec | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/python-qt5.spec b/python-qt5.spec index 13ca901..6eba79c 100644 --- a/python-qt5.spec +++ b/python-qt5.spec @@ -1,13 +1,17 @@ %if 0%{?fedora} -%global with_python3 1 +#global with_python3 1 +%global python3_dbus_dir %(%{__python3} -c "import dbus.mainloop; print(dbus.mainloop.__path__[0])") +#global python3_dbus_dir %(d=%{python3_sitearch}/dbus/mainloop; [ -d $d ] || d=%{python3_sitelib}/dbus/mainloop; echo $d) %endif %global with_python2 1 +%global python2_dbus_dir %(%{__python2} -c "import dbus.mainloop; print(dbus.mainloop.__path__[0])") +#global python2_dbus_dir %(d=%{python2_sitearch}/dbus/mainloop; [ -d $d ] || d=%{python2_sitelib}/dbus/mainloop; echo $d) Summary: Python bindings for Qt5 Name: python-qt5 Version: 5.3.2 -Release: 3%{?dist} +Release: 4%{?dist} # all BSD, except for GPLv2+ dbus bindings and examples License: BSD and GPLv2+ @@ -27,11 +31,8 @@ Patch1: PyQt5-5.3.2-add-dep-to-QtWebKitWidgets.patch BuildRequires: chrpath BuildRequires: findutils BuildRequires: pkgconfig(dbus-1) -# dbus-python-1.2.0-7 fixed to use sitearch, https://bugzilla.redhat.com/1161121 -%global dbus_python_ver 1.2.0-7 -BuildRequires: dbus-python >= %{dbus_python_ver}, pkgconfig(dbus-python) +BuildRequires: pkgconfig(dbus-python) BuildRequires: pkgconfig(phonon4qt5) - BuildRequires: pkgconfig(Qt5Core) >= 5.3 BuildRequires: pkgconfig(Qt5Bluetooth) BuildRequires: pkgconfig(Qt5DBus) pkgconfig(Qt5Declarative) @@ -85,7 +86,7 @@ of the Qt5 classes (e.g. KDE or your own). Summary: Python 3 bindings for Qt5 %{?_sip_api:Requires: python3-sip-api(%{_sip_api_major}) >= %{_sip_api}} Provides: python3-PyQt5 = %{version}-%{release} -Requires: python3-dbus >= %{dbus_python_ver} +Requires: python3-dbus %description -n python3-qt5 %{summary}. @@ -169,7 +170,7 @@ rm -rfv %{buildroot}%{python3_sitearch}/PyQt5/uic/port_v2/ %files %doc NEWS README %doc LICENSE -%{python2_sitearch}/dbus/mainloop/pyqt5.so +%{python2_dbus_dir}/pyqt5.so %{_qt5_plugindir}/PyQt5/ %dir %{python2_sitearch}/PyQt5/ %{python2_sitearch}/PyQt5/__init__.py* @@ -214,7 +215,7 @@ rm -rfv %{buildroot}%{python3_sitearch}/PyQt5/uic/port_v2/ %files -n python3-qt5 %doc NEWS README %doc LICENSE -%{python3_sitearch}/dbus/mainloop/pyqt5.so +%{python3_dbus_dir}/pyqt5.so %dir %{python3_sitearch}/PyQt5/ %{python3_sitearch}/PyQt5/__pycache__/ %{python3_sitearch}/PyQt5/__init__.py* @@ -257,7 +258,10 @@ rm -rfv %{buildroot}%{python3_sitearch}/PyQt5/uic/port_v2/ %changelog -* Thu Nov 06 2014 Rex Dieter - 5.3.2-2 +* Thu Nov 06 2014 Rex Dieter 5.3.2-4 +- try to determine dbus-python install paths dynamically (#1161121) + +* Thu Nov 06 2014 Rex Dieter - 5.3.2-3 - Build failure in sipQtWebKitWidgestQWebInspector: qprinter.h not found (#1160932) - python2_sitelib should be python2_sitearch (#1161121)