summaryrefslogtreecommitdiffstats
path: root/build/qt5.py
diff options
context:
space:
mode:
authorUwe Klotz <uwe_klotz@web.de>2017-11-14 23:37:48 +0100
committerUwe Klotz <uwe_klotz@web.de>2017-11-15 22:40:00 +0100
commita46a87d7439b484fa996cd907f1d960b169bca53 (patch)
tree42622d3d528841c31854ab9c628ee8822c667444 /build/qt5.py
parente4dd64b401afaad904eb5c84ad19198946501f8c (diff)
Fix Python print statements
Diffstat (limited to 'build/qt5.py')
-rw-r--r--build/qt5.py30
1 files changed, 15 insertions, 15 deletions
diff --git a/build/qt5.py b/build/qt5.py
index aa70a42c81..37ccb012c7 100644
--- a/build/qt5.py
+++ b/build/qt5.py
@@ -190,7 +190,7 @@ class _Automoc:
h = find_file(hname, [cpp.get_dir()]+moc_options['cpppaths'], env.File)
if h:
if moc_options['debug']:
- print "scons: qt5: Scanning '%s' (header of '%s')" % (str(h), str(cpp))
+ print("scons: qt5: Scanning '%s' (header of '%s')" % (str(h), str(cpp)))
h_contents = h.get_contents()
if moc_options['gobble_comments']:
h_contents = self.ccomment.sub('', h_contents)
@@ -198,24 +198,24 @@ class _Automoc:
h_contents = self.literal_qobject.sub('""', h_contents)
break
if not h and moc_options['debug']:
- print "scons: qt5: no header for '%s'." % (str(cpp))
+ print("scons: qt5: no header for '%s'." % (str(cpp)))
if h and self.qo_search.search(h_contents):
# h file with the Q_OBJECT macro found -> add moc_cpp
moc_cpp = env.Moc5(h)
if moc_options['debug']:
- print "scons: qt5: found Q_OBJECT macro in '%s', moc'ing to '%s'" % (str(h), str(moc_cpp))
+ print("scons: qt5: found Q_OBJECT macro in '%s', moc'ing to '%s'" % (str(h), str(moc_cpp)))
# Now, check whether the corresponding CPP file
# includes the moc'ed output directly...
inc_moc_cpp = r'^\s*#\s*include\s+"%s"' % str(moc_cpp[0])
if cpp and re.search(inc_moc_cpp, cpp_contents, re.M):
if moc_options['debug']:
- print "scons: qt5: CXX file '%s' directly includes the moc'ed output '%s', no compiling required" % (str(cpp), str(moc_cpp))
+ print("scons: qt5: CXX file '%s' directly includes the moc'ed output '%s', no compiling required" % (str(cpp), str(moc_cpp)))
env.Depends(cpp, moc_cpp)
else:
moc_o = self.objBuilder(moc_cpp)
if moc_options['debug']:
- print "scons: qt5: compiling '%s' to '%s'" % (str(cpp), str(moc_o))
+ print("scons: qt5: compiling '%s' to '%s'" % (str(cpp), str(moc_o)))
out_sources.extend(moc_o)
if cpp and self.qo_search.search(cpp_contents):
# cpp file with Q_OBJECT macro found -> add moc
@@ -223,7 +223,7 @@ class _Automoc:
moc = env.Moc5(cpp)
env.Ignore(moc, moc)
if moc_options['debug']:
- print "scons: qt5: found Q_OBJECT macro in '%s', moc'ing to '%s'" % (str(cpp), str(moc))
+ print("scons: qt5: found Q_OBJECT macro in '%s', moc'ing to '%s'" % (str(cpp), str(moc)))
def __automoc_strategy_include_driven(self, env, moc_options,
cpp, cpp_contents, out_sources):
@@ -258,7 +258,7 @@ class _Automoc:
h = find_file(hname, [cpp.get_dir()]+moc_options['cpppaths'], env.File)
if h:
if moc_options['debug']:
- print "scons: qt5: Scanning '%s' (header of '%s')" % (str(h), str(cpp))
+ print("scons: qt5: Scanning '%s' (header of '%s')" % (str(h), str(cpp)))
h_contents = h.get_contents()
if moc_options['gobble_comments']:
h_contents = self.ccomment.sub('', h_contents)
@@ -266,7 +266,7 @@ class _Automoc:
h_contents = self.literal_qobject.sub('""', h_contents)
break
if not h and moc_options['debug']:
- print "scons: qt5: no header for '%s'." % (str(cpp))
+ print("scons: qt5: no header for '%s'." % (str(cpp)))
if h and self.qo_search.search(h_contents):
# h file with the Q_OBJECT macro found -> add moc_cpp
moc_cpp = env.XMoc5(h)
@@ -280,10 +280,10 @@ class _Automoc:
out_sources.pop(idx)
break
if moc_options['debug']:
- print "scons: qt5: found Q_OBJECT macro in '%s', moc'ing to '%s'" % (str(h), str(h_moc))
+ print("scons: qt5: found Q_OBJECT macro in '%s', moc'ing to '%s'" % (str(h), str(h_moc)))
else:
if moc_options['debug']:
- print "scons: qt5: found no Q_OBJECT macro in '%s', but a moc'ed version '%s' gets included in '%s'" % (str(h), inc_h_moc, cpp.name)
+ print("scons: qt5: found no Q_OBJECT macro in '%s', but a moc'ed version '%s' gets included in '%s'" % (str(h), inc_h_moc, cpp.name))
if cpp and re.search(inc_cxx_moc, cpp_contents):
# cpp file with #include directive for a MOCed cxx file found -> add moc
@@ -292,10 +292,10 @@ class _Automoc:
env.Ignore(moc, moc)
added = True
if moc_options['debug']:
- print "scons: qt5: found Q_OBJECT macro in '%s', moc'ing to '%s'" % (str(cpp), str(moc))
+ print("scons: qt5: found Q_OBJECT macro in '%s', moc'ing to '%s'" % (str(cpp), str(moc)))
else:
if moc_options['debug']:
- print "scons: qt5: found no Q_OBJECT macro in '%s', although a moc'ed version '%s' of itself gets included" % (cpp.name, inc_cxx_moc)
+ print("scons: qt5: found no Q_OBJECT macro in '%s', although a moc'ed version '%s' of itself gets included" % (cpp.name, inc_cxx_moc))
if not added:
# Fallback to default Automoc strategy (Q_OBJECT driven)
@@ -328,17 +328,17 @@ class _Automoc:
if not moc_options['auto_scan']:
break
if isinstance(obj,basestring): # big kludge!
- print "scons: qt5: '%s' MAYBE USING AN OLD SCONS VERSION AND NOT CONVERTED TO 'File'. Discarded." % str(obj)
+ print("scons: qt5: '%s' MAYBE USING AN OLD SCONS VERSION AND NOT CONVERTED TO 'File'. Discarded." % str(obj))
continue
if not obj.has_builder():
# binary obj file provided
if moc_options['debug']:
- print "scons: qt5: '%s' seems to be a binary. Discarded." % str(obj)
+ print("scons: qt5: '%s' seems to be a binary. Discarded." % str(obj))
continue
cpp = obj.sources[0]
if not self.splitext(str(cpp))[1] in cxx_suffixes:
if moc_options['debug']:
- print "scons: qt5: '%s' is no cxx file. Discarded." % str(cpp)
+ print("scons: qt5: '%s' is no cxx file. Discarded." % str(cpp))
# c or fortran source
continue
try: