Source

pyside_aur / python-pyside-tools / py3.patch

Full commit
diff --git a/CMakeLists.txt b/CMakeLists.txt
index bbc8536..b47081b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -19,7 +19,7 @@ option(BUILD_TESTS "Build tests." TRUE)
 if (NOT SITE_PACKAGE)
     execute_process(
         COMMAND ${PYTHON_EXECUTABLE} -c "from distutils import sysconfig; \\
-            print sysconfig.get_python_lib(1,0,prefix='${CMAKE_INSTALL_PREFIX}')"
+            print(sysconfig.get_python_lib(1,0,prefix='${CMAKE_INSTALL_PREFIX}'))"
         OUTPUT_VARIABLE SITE_PACKAGE
     OUTPUT_STRIP_TRAILING_WHITESPACE)
     if (NOT SITE_PACKAGE)
diff --git a/pysideuic/objcreator.py b/pysideuic/objcreator.py
index 80c0a89..542974b 100644
--- a/pysideuic/objcreator.py
+++ b/pysideuic/objcreator.py
@@ -24,7 +24,7 @@ import sys
 import os.path
 
 from pysideuic.exceptions import NoSuchWidgetError, WidgetPluginError
-from port_v2.load_plugin import load_plugin
+from pysideuic.port_v2.load_plugin import load_plugin
 
 
 # The list of directories that are searched for widget plugins.  This is
diff --git a/pysideuic/port_v2/as_string.py b/pysideuic/port_v2/as_string.py
index cb7780c..ddb65fd 100644
--- a/pysideuic/port_v2/as_string.py
+++ b/pysideuic/port_v2/as_string.py
@@ -24,7 +24,7 @@ import re
 
 def as_string(obj, encode=True):
     if isinstance(obj, str):
-        s = '"' + _escape(obj.encode('UTF-8')) + '"'
+        s = '"' + _escape(obj) + '"'
         return s
 
     return str(obj)
diff --git a/pysideuic/port_v2/ascii_upper.py b/pysideuic/port_v2/ascii_upper.py
index 05843bf..dbb0c51 100644
--- a/pysideuic/port_v2/ascii_upper.py
+++ b/pysideuic/port_v2/ascii_upper.py
@@ -23,7 +23,7 @@ import string
 
 
 # A translation table for converting ASCII lower case to upper case.
-_ascii_trans_table = string.maketrans(string.ascii_lowercase,
+_ascii_trans_table = str.maketrans(string.ascii_lowercase,
         string.ascii_uppercase)
 
 
diff --git a/pysideuic/uiparser.py b/pysideuic/uiparser.py
index 4c7cbe1..82823fb 100644
--- a/pysideuic/uiparser.py
+++ b/pysideuic/uiparser.py
@@ -31,9 +31,9 @@ except ImportError:
     from xml.etree.ElementTree import parse, SubElement
 
 
-from exceptions import NoSuchWidgetError
-from objcreator import QObjectCreator
-from properties import Properties
+from pysideuic.exceptions import NoSuchWidgetError
+from pysideuic.objcreator import QObjectCreator
+from pysideuic.properties import Properties
 
 
 logger = logging.getLogger(__name__)
diff --git a/tests/rcc/run_test.sh b/tests/rcc/run_test.sh
index f3b7882..6f592dd 100755
--- a/tests/rcc/run_test.sh
+++ b/tests/rcc/run_test.sh
@@ -8,6 +8,6 @@
 # $3: qrc file
 
 export PYTHONPATH=$PYTHONPATH:`pwd`
-$1 -o `basename $3 .qrc`_rc.py $3
+$1 -py3 -o `basename $3 .qrc`_rc.py $3
 `pkg-config shiboken --variable=python_interpreter` $2