summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'BuildTools/SCons/Tools')
-rw-r--r--BuildTools/SCons/Tools/AppBundle.py4
-rw-r--r--BuildTools/SCons/Tools/InstallWithSymLinks.py8
-rw-r--r--BuildTools/SCons/Tools/qt4.py22
-rw-r--r--BuildTools/SCons/Tools/textfile.py2
4 files changed, 18 insertions, 18 deletions
diff --git a/BuildTools/SCons/Tools/AppBundle.py b/BuildTools/SCons/Tools/AppBundle.py
index 337e83f..31cfef1 100644
--- a/BuildTools/SCons/Tools/AppBundle.py
+++ b/BuildTools/SCons/Tools/AppBundle.py
@@ -36,3 +36,3 @@ def generate(env) :
plist += "<key>" + key + "</key>\n"
- plist += "<string>" + value.encode("utf-8") + "</string>\n"
+ plist += "<string>" + value + "</string>\n"
if handlesXMPPURIs :
@@ -52,3 +52,3 @@ def generate(env) :
plist += "<key>SUPublicDSAKeyFile</key>"
- plist += "<string>" + sparklePublicDSAKey.name.encode("utf-8") + "</string>"
+ plist += "<string>" + sparklePublicDSAKey.name + "</string>"
env.Install(resourcesDir, sparklePublicDSAKey)
diff --git a/BuildTools/SCons/Tools/InstallWithSymLinks.py b/BuildTools/SCons/Tools/InstallWithSymLinks.py
index 23d12ed..4955192 100644
--- a/BuildTools/SCons/Tools/InstallWithSymLinks.py
+++ b/BuildTools/SCons/Tools/InstallWithSymLinks.py
@@ -76,3 +76,3 @@ def scons_copytree(src, dst, symlinks=False):
# XXX What about devices, sockets etc.?
- except (IOError, os.error), why:
+ except (IOError, os.error) as why:
errors.append((srcname, dstname, str(why)))
@@ -80,3 +80,3 @@ def scons_copytree(src, dst, symlinks=False):
# continue with other files
- except CopytreeError, err:
+ except CopytreeError as err:
errors.extend(err.args[0])
@@ -87,6 +87,6 @@ def scons_copytree(src, dst, symlinks=False):
pass
- except OSError, why:
+ except OSError as why:
errors.extend((src, dst, str(why)))
if errors:
- raise CopytreeError, errors
+ raise CopytreeError(errors)
diff --git a/BuildTools/SCons/Tools/qt4.py b/BuildTools/SCons/Tools/qt4.py
index e859017..372b261 100644
--- a/BuildTools/SCons/Tools/qt4.py
+++ b/BuildTools/SCons/Tools/qt4.py
@@ -142,4 +142,4 @@ class _Automoc:
for obj in source:
- if isinstance(obj,basestring): # big kludge!
- print "scons: qt4: '%s' MAYBE USING AN OLD SCONS VERSION AND NOT CONVERTED TO 'File'. Discarded." % str(obj)
+ if isinstance(obj,str): # big kludge!
+ print("scons: qt4: '%s' MAYBE USING AN OLD SCONS VERSION AND NOT CONVERTED TO 'File'. Discarded." % str(obj))
continue
@@ -148,3 +148,3 @@ class _Automoc:
if debug:
- print "scons: qt: '%s' seems to be a binary. Discarded." % str(obj)
+ print("scons: qt: '%s' seems to be a binary. Discarded." % str(obj))
continue
@@ -153,3 +153,3 @@ class _Automoc:
if debug:
- print "scons: qt: '%s' is no cxx file. Discarded." % str(cpp)
+ print("scons: qt: '%s' is no cxx file. Discarded." % str(cpp) )
# c or fortran source
@@ -158,3 +158,3 @@ class _Automoc:
try:
- cpp_contents = cpp.get_contents()
+ cpp_contents = str(cpp.get_contents())
except: continue # may be an still not generated source
@@ -168,8 +168,8 @@ class _Automoc:
if debug:
- print "scons: qt: Scanning '%s' (header of '%s')" % (str(h), str(cpp))
+ print("scons: qt: Scanning '%s' (header of '%s')" % (str(h), str(cpp)))
#h_contents = comment.sub('', h.get_contents())
- h_contents = h.get_contents()
+ h_contents = str(h.get_contents())
break
if not h and debug:
- print "scons: qt: no header for '%s'." % (str(cpp))
+ print("scons: qt: no header for '%s'." % (str(cpp)))
if h and q_object_search.search(h_contents):
@@ -181,3 +181,3 @@ class _Automoc:
if debug:
- print "scons: qt: found Q_OBJECT macro in '%s', moc'ing to '%s'" % (str(h), str(moc_cpp))
+ print("scons: qt: found Q_OBJECT macro in '%s', moc'ing to '%s'" % (str(h), str(moc_cpp)))
if cpp and q_object_search.search(cpp_contents):
@@ -188,3 +188,3 @@ class _Automoc:
if debug:
- print "scons: qt: found Q_OBJECT macro in '%s', moc'ing to '%s'" % (str(cpp), str(moc))
+ print("scons: qt: found Q_OBJECT macro in '%s', moc'ing to '%s'" % (str(cpp), str(moc)))
#moc.source_scanner = SCons.Defaults.CScan
@@ -349,3 +349,3 @@ def generate(env):
return result
- contents = node.get_contents()
+ contents = str(node.get_contents())
includes = [included[1] for included in qrcinclude_re.findall(contents)]
diff --git a/BuildTools/SCons/Tools/textfile.py b/BuildTools/SCons/Tools/textfile.py
index 9b424f2..02fc54a 100644
--- a/BuildTools/SCons/Tools/textfile.py
+++ b/BuildTools/SCons/Tools/textfile.py
@@ -109,3 +109,3 @@ def _action(target, source, env):
fd = open(target[0].get_path(), "wb")
- except (OSError,IOError), e:
+ except (OSError,IOError) as e:
raise SCons.Errors.UserError("Can't write target file %s" % target[0])