[PyQt4] - backport pyuic fix for python2

Rex Dieter rdieter at fedoraproject.org
Mon Sep 13 16:49:59 UTC 2010


commit 8b8f717083eef44fe2af10b1f78fa618a504ae8d
Author: Rex Dieter <rdieter at fedoraproject.org>
Date:   Mon Sep 13 11:55:19 2010 -0500

    - backport pyuic fix for python2

 PyQt-4.7.6-pyuic_python2.patch |   14 ++++++++++++++
 PyQt4.spec                     |    9 ++++++++-
 2 files changed, 22 insertions(+), 1 deletions(-)
---
diff --git a/PyQt-4.7.6-pyuic_python2.patch b/PyQt-4.7.6-pyuic_python2.patch
new file mode 100644
index 0000000..c67cd26
--- /dev/null
+++ b/PyQt-4.7.6-pyuic_python2.patch
@@ -0,0 +1,14 @@
+--- PyQt-x11-gpl-4.7.6/pyuic/uic/driver.py	2010-09-06 08:16:45.000000000 -0500
++++ PyQt-x11-gpl-snapshot-4.7.7-bc395557c0e6/pyuic/uic/driver.py	2010-09-07 21:38:43.000000000 -0500
+@@ -56,8 +56,10 @@
+ 
+         if self._opts.output == "-":
+             pyfile = sys.stdout
+-        else:
++        elif sys.hexversion >= 0x03000000:
+             pyfile = open(self._opts.output, 'wt', encoding='utf8')
++        else:
++            pyfile = open(self._opts.output, 'wt')
+ 
+         compileUi(self._ui_file, pyfile, self._opts.execute, self._opts.indent,
+                 self._opts.pyqt3_wrapper, self._opts.from_imports)
diff --git a/PyQt4.spec b/PyQt4.spec
index 183cf1e..9810472 100644
--- a/PyQt4.spec
+++ b/PyQt4.spec
@@ -8,7 +8,7 @@
 Summary: Python bindings for Qt4
 Name: 	 PyQt4
 Version: 4.7.6
-Release: 1%{?dist}
+Release: 2%{?dist}
 
 # GPLv2 exceptions(see GPL_EXCEPTIONS*.txt)
 License: GPLv3 or GPLv2 with exceptions
@@ -26,6 +26,9 @@ Patch5:  PyQt-x11-gpl-4.6.2-timestamp-multilib.patch
 # fix implicit linking when checking for QtAssistant, QtHelp
 Patch6:  PyQt-x11-gpl-4.7.2-fix-implicit-linking.patch
 
+## upstream patches
+Patch100: PyQt-4.7.6-pyuic_python2.patch
+
 BuildRequires: chrpath
 BuildRequires: dbus-devel dbus-python-devel
 BuildRequires: findutils
@@ -96,6 +99,7 @@ from any of the Qt4 classes (e.g. KDE or your own).
 %patch4 -p1 
 %patch5 -p1 -b .timestamp
 %patch6 -p1 -b .fix-implicit-linking
+%patch100 -p1 -b .pyuic_python2
 
 ## permissions
 # mark examples non-executable
@@ -243,6 +247,9 @@ rm -rf %{buildroot}
 
 
 %changelog
+* Mon Sep 13 2010 Rex Dieter <rdieter at fedoraproject.org> - 4.7.6-2
+- backport pyuic fix for python2
+
 * Thu Sep 09 2010 Rex Dieter <rdieter at fedoraproject.org> - 4.7.6-1
 - PyQt-x11-gpl-4.7.6
 


More information about the scm-commits mailing list