From 159a14ecf76d5422bf174633b6c119739c8146c2 Mon Sep 17 00:00:00 2001 From: Sandro Mani Date: Fri, 5 Jun 2015 00:42:37 +0200 Subject: [PATCH] Fix python3 sipdir --- python-qt5.spec | 9 +++++++-- python-qt5_sipdir.patch | 20 ++++++++++++++++++++ 2 files changed, 27 insertions(+), 2 deletions(-) create mode 100644 python-qt5_sipdir.patch diff --git a/python-qt5.spec b/python-qt5.spec index 4b25069..359a9e6 100644 --- a/python-qt5.spec +++ b/python-qt5.spec @@ -13,7 +13,7 @@ Summary: Python bindings for Qt5 Name: python-qt5 Version: 5.4.1 -Release: 3%{?dist} +Release: 4%{?dist} # all BSD, except for GPLv2+ dbus bindings and examples License: BSD and GPLv2+ @@ -28,6 +28,7 @@ Source1: macros.pyqt5 ## upstream patches ## upstreamable patches +Patch0: python-qt5_sipdir.patch BuildRequires: chrpath BuildRequires: findutils @@ -111,6 +112,7 @@ BuildArch: noarch %prep %setup -q -n PyQt-gpl-%{version}%{?snap:-snapshot-%{snap}} +%patch0 -p1 %if 0%{?with_python3} rm -rf %{py3dir} @@ -278,7 +280,7 @@ sed -i \ %{_bindir}/pylupdate5 %{_bindir}/pyrcc5 %{_bindir}/pyuic5 -%{_datadir}/sip/PyQt5/ +%{_datadir}/python3-sip/PyQt5/ %endif # with_python3 %files doc @@ -287,6 +289,9 @@ sed -i \ %changelog +* Fri Jun 05 2015 Sandro Mani - 5.4.1-4 +- Add patch to fix python3 sip installation dir (#1228432) + * Sat May 02 2015 Kalev Lember - 5.4.1-3 - Rebuilt for GCC 5 C++11 ABI change diff --git a/python-qt5_sipdir.patch b/python-qt5_sipdir.patch new file mode 100644 index 0000000..8f42211 --- /dev/null +++ b/python-qt5_sipdir.patch @@ -0,0 +1,20 @@ +diff -rupN PyQt-gpl-5.4.1/configure.py PyQt-gpl-5.4.1-new/configure.py +--- PyQt-gpl-5.4.1/configure.py 2015-02-26 13:17:00.000000000 +0100 ++++ PyQt-gpl-5.4.1-new/configure.py 2015-06-05 00:12:06.326506542 +0200 +@@ -25,6 +25,7 @@ import os + import shutil + import stat + import sys ++import sipconfig + + + # Initialise the constants. +@@ -463,7 +464,7 @@ class TargetConfiguration: + self.py_version = py_config.version + self.pyqt_bin_dir = py_config.bin_dir + self.pyqt_module_dir = py_config.module_dir +- self.pyqt_sip_dir = os.path.join(py_config.data_dir, 'sip', 'PyQt5') ++ self.pyqt_sip_dir = os.path.join(sipconfig.Configuration().default_sip_dir, 'PyQt5') + self.pyuic_interpreter = py_config.pyuic_interpreter + + # The qmake spec we want to use.