diff options
-rw-r--r-- | test/CPPDEFINES/pkg-config.py | 12 | ||||
-rw-r--r-- | test/Deprecated/Options/EnumOption.py | 6 | ||||
-rw-r--r-- | test/Deprecated/Options/ListOption.py | 16 | ||||
-rw-r--r-- | test/Entry.py | 12 | ||||
-rw-r--r-- | test/Environment.py | 4 | ||||
-rw-r--r-- | test/Errors/Exception.py | 2 | ||||
-rw-r--r-- | test/ExecuteInvalidateCache.py | 4 | ||||
-rw-r--r-- | test/Exit.py | 12 | ||||
-rw-r--r-- | test/File.py | 16 | ||||
-rw-r--r-- | test/FindFile.py | 8 | ||||
-rw-r--r-- | test/Flatten.py | 8 | ||||
-rw-r--r-- | test/GetBuildFailures/parallel.py | 6 | ||||
-rw-r--r-- | test/GetBuildFailures/serial.py | 4 | ||||
-rw-r--r-- | test/GetOption/help.py | 4 | ||||
-rw-r--r-- | test/Libs/SharedLibraryIxes.py | 16 | ||||
-rw-r--r-- | test/Mkdir.py | 2 | ||||
-rw-r--r-- | test/NodeOps.py | 4 | ||||
-rw-r--r-- | test/ParseConfig.py | 32 | ||||
-rw-r--r-- | test/Platform.py | 16 | ||||
-rw-r--r-- | test/QT/QTFLAGS.py | 8 | ||||
-rw-r--r-- | test/QT/manual.py | 6 | ||||
-rw-r--r-- | test/tool_args.py | 8 | ||||
-rw-r--r-- | test/toolpath/basic.py | 62 |
23 files changed, 134 insertions, 134 deletions
diff --git a/test/CPPDEFINES/pkg-config.py b/test/CPPDEFINES/pkg-config.py index 1b308d3..4e81dec 100644 --- a/test/CPPDEFINES/pkg-config.py +++ b/test/CPPDEFINES/pkg-config.py @@ -60,26 +60,26 @@ test.write('SConstruct', """\ # Passing test cases env_1 = Environment(CPPDEFINES=[('DEBUG','1'), 'TEST']) env_1.ParseConfig('PKG_CONFIG_PATH=. %(pkg_config_path)s --cflags bug') -print env_1.subst('$_CPPDEFFLAGS') +print(env_1.subst('$_CPPDEFFLAGS')) env_2 = Environment(CPPDEFINES=[('DEBUG','1'), 'TEST']) env_2.MergeFlags('-DSOMETHING -DVARIABLE=2') -print env_2.subst('$_CPPDEFFLAGS') +print(env_2.subst('$_CPPDEFFLAGS')) # Failing test cases env_3 = Environment(CPPDEFINES={'DEBUG':1, 'TEST':None}) env_3.ParseConfig('PKG_CONFIG_PATH=. %(pkg_config_path)s --cflags bug') -print env_3.subst('$_CPPDEFFLAGS') +print(env_3.subst('$_CPPDEFFLAGS')) env_4 = Environment(CPPDEFINES={'DEBUG':1, 'TEST':None}) env_4.MergeFlags('-DSOMETHING -DVARIABLE=2') -print env_4.subst('$_CPPDEFFLAGS') +print(env_4.subst('$_CPPDEFFLAGS')) # http://scons.tigris.org/issues/show_bug.cgi?id=1738 env_1738_1 = Environment(tools=['default']) env_1738_1.ParseConfig('PKG_CONFIG_PATH=. %(pkg_config_path)s --cflags --libs bug') env_1738_1.Append(CPPDEFINES={'value' : '1'}) -print env_1738_1.subst('$_CPPDEFFLAGS') +print(env_1738_1.subst('$_CPPDEFFLAGS')) """%locals() ) expect_print_output="""\ @@ -92,7 +92,7 @@ expect_print_output="""\ build_output="scons: `.' is up to date.\n" -expect = test.wrap_stdout(build_str=build_output, +expect = test.wrap_stdout(build_str=build_output, read_str = expect_print_output) test.run(arguments = '.', stdout=expect) test.pass_test() diff --git a/test/Deprecated/Options/EnumOption.py b/test/Deprecated/Options/EnumOption.py index 57ae7eb..2b3ed47 100644 --- a/test/Deprecated/Options/EnumOption.py +++ b/test/Deprecated/Options/EnumOption.py @@ -66,9 +66,9 @@ opts.AddOptions( env = Environment(options=opts) Help(opts.GenerateHelpText(env)) -print env['debug'] -print env['guilib'] -print env['some'] +print(env['debug']) +print(env['guilib'] +print(env['some']) Default(env.Alias('dummy', None)) """) diff --git a/test/Deprecated/Options/ListOption.py b/test/Deprecated/Options/ListOption.py index bb3775b..ad804f2 100644 --- a/test/Deprecated/Options/ListOption.py +++ b/test/Deprecated/Options/ListOption.py @@ -67,15 +67,15 @@ env = Environment(options=opts) opts.Save(optsfile, env) Help(opts.GenerateHelpText(env)) -print env['shared'] -if 'ical' in env['shared']: print '1' -else: print '0' +print(env['shared']) +if 'ical' in env['shared']: print('1') +else: print('0') for x in env['shared']: - print x, -print -print env.subst('$shared') + print(x, end='') +print() +print(env.subst('$shared')) # Test subst_path() because it's used in $CPPDEFINES expansions. -print env.subst_path('$shared') +print(env.subst_path('$shared')) Default(env.Alias('dummy', None)) """) @@ -169,7 +169,7 @@ opts.AddOptions( env = Environment(options=opts) Help(opts.GenerateHelpText(env)) -print env['gpib'] +print(env['gpib']) Default(env.Alias('dummy', None)) """) diff --git a/test/Entry.py b/test/Entry.py index 3767cc5..3d3255d 100644 --- a/test/Entry.py +++ b/test/Entry.py @@ -36,12 +36,12 @@ test = TestSCons.TestSCons() test.write('SConstruct', """ env = Environment(FOO = 'fff', BAR = 'bbb') -print Entry('ddd') -print Entry('$FOO') -print Entry('${BAR}_$BAR') -print env.Entry('eee') -print env.Entry('$FOO') -print env.Entry('${BAR}_$BAR') +print(Entry('ddd')) +print(Entry('$FOO')) +print(Entry('${BAR}_$BAR')) +print(env.Entry('eee')) +print(env.Entry('$FOO')) +print(env.Entry('${BAR}_$BAR')) """) test.run(stdout = test.wrap_stdout(read_str = """\ diff --git a/test/Environment.py b/test/Environment.py index 52b6488..6810979 100644 --- a/test/Environment.py +++ b/test/Environment.py @@ -42,8 +42,8 @@ assert Dir('.') == Dir('.').Dir('.') assert target == target.File('foo.out') e2 = env.Environment(XXX='$BAR', YYY='$BLAT') -print e2['XXX'] -print e2['YYY'] +print(e2['XXX']) +print(e2['YYY']) """ % locals()) test.write('build.py', """ diff --git a/test/Errors/Exception.py b/test/Errors/Exception.py index cc36035..30404fc 100644 --- a/test/Errors/Exception.py +++ b/test/Errors/Exception.py @@ -30,7 +30,7 @@ test = TestSCons.TestSCons(match = TestSCons.match_re_dotall) test.write('SConstruct', """\ def foo(env, target, source): - print str(target[0]) + print(str(target[0])) open(str(target[0]), 'wt').write('foo') def exit(env, target, source): diff --git a/test/ExecuteInvalidateCache.py b/test/ExecuteInvalidateCache.py index a22c5ea..6d8063e 100644 --- a/test/ExecuteInvalidateCache.py +++ b/test/ExecuteInvalidateCache.py @@ -40,9 +40,9 @@ subfn = os.path.join('sub', 'foo') test.write('SConstruct', """\ def exists(node): if node.exists(): - print str(node), "exists" + print(str(node), "exists") else: - print str(node), "does not exist" + print(str(node), "does not exist") Execute(Delete('abc')) n1 = File('abc') diff --git a/test/Exit.py b/test/Exit.py index 877a0b6..394ee2f 100644 --- a/test/Exit.py +++ b/test/Exit.py @@ -40,7 +40,7 @@ subdir_foo_in = os.path.join('subdir', 'foo.in') subdir_foo_out = os.path.join('subdir', 'foo.out') test.write('SConstruct', """\ -print "SConstruct, Exit()" +print("SConstruct, Exit()") Exit() """) @@ -51,7 +51,7 @@ SConstruct, Exit() test.write('SConstruct', """\ env = Environment() -print "SConstruct, env.Exit()" +print("SConstruct, env.Exit()") env.Exit() """) @@ -61,7 +61,7 @@ SConstruct, env.Exit() """) test.write('SConstruct', """\ -print "SConstruct" +print("SConstruct") Exit(7) """) @@ -71,12 +71,12 @@ SConstruct """) test.write('SConstruct', """\ -print "SConstruct" +print("SConstruct") SConscript('subdir/SConscript') """) test.write(['subdir', 'SConscript'], """\ -print "subdir/SConscript" +print("subdir/SConscript") Exit() """) @@ -87,7 +87,7 @@ subdir/SConscript """) test.write(['subdir', 'SConscript'], """\ -print "subdir/SConscript" +print("subdir/SConscript") Exit(17) """) diff --git a/test/File.py b/test/File.py index d919884..ec148b2 100644 --- a/test/File.py +++ b/test/File.py @@ -38,16 +38,16 @@ test = TestSCons.TestSCons() test.write('SConstruct', """ env = Environment(FOO = 'fff', BAR = 'bbb') -print File('ddd') -print File('$FOO') -print File('${BAR}_$BAR') -print env.File('eee') -print env.File('$FOO') -print env.File('${BAR}_$BAR') +print(File('ddd')) +print(File('$FOO')) +print(File('${BAR}_$BAR')) +print(env.File('eee')) +print(env.File('$FOO')) +print(env.File('${BAR}_$BAR')) f1 = env.File('f1') -print f1 +print(f1) f2 = f1.File('f2') -print f2 +print(f2) """) expect = test.wrap_stdout(read_str = """\ diff --git a/test/FindFile.py b/test/FindFile.py index 5d198ac..e878172 100644 --- a/test/FindFile.py +++ b/test/FindFile.py @@ -40,13 +40,13 @@ test.write(['bar', 'baz', 'testfile2'], 'test 4\n') test.write('SConstruct', """ env = Environment(FILE = 'file', BAR = 'bar') file1 = FindFile('testfile1', [ 'foo', '.', 'bar', 'bar/baz' ]) -print open(str(file1), 'r').read() +print(open(str(file1), 'r').read()) file2 = env.FindFile('test${FILE}1', [ 'bar', 'foo', '.', 'bar/baz' ]) -print open(str(file2), 'r').read() +print(open(str(file2), 'r').read()) file3 = FindFile('testfile2', [ 'foo', '.', 'bar', 'bar/baz' ]) -print open(str(file3), 'r').read() +print(open(str(file3), 'r').read()) file4 = env.FindFile('testfile2', [ '$BAR/baz', 'foo', '.', 'bar' ]) -print open(str(file4), 'r').read() +print(open(str(file4), 'r').read()) """) expect = test.wrap_stdout(read_str = """test 1 diff --git a/test/Flatten.py b/test/Flatten.py index b41c4fe..fd9943d 100644 --- a/test/Flatten.py +++ b/test/Flatten.py @@ -44,15 +44,15 @@ def cat(env, source, target): env = Environment(BUILDERS={'Cat':Builder(action=cat)}) f1 = env.Cat('../file1.out', 'file1.in') f2 = env.Cat('../file2.out', ['file2a.in', 'file2b.in']) -print list(map(str, Flatten(['begin', f1, 'middle', f2, 'end']))) -print list(map(str, env.Flatten([f1, [['a', 'b'], 'c'], f2]))) +print(list(map(str, Flatten(['begin', f1, 'middle', f2, 'end'])))) +print(list(map(str, env.Flatten([f1, [['a', 'b'], 'c'], f2])))) SConscript('SConscript', "env") """) test.write(['work', 'SConscript'], """ Import("env") -print Flatten([1, [2, 3], 4]) -print env.Flatten([[[[1], 2], 3], 4]) +print(Flatten([1, [2, 3], 4])) +print(env.Flatten([[[[1], 2], 3], 4])) """) test.write('file1.in', "file1.in\n") diff --git a/test/GetBuildFailures/parallel.py b/test/GetBuildFailures/parallel.py index e746d53..ee0e831 100644 --- a/test/GetBuildFailures/parallel.py +++ b/test/GetBuildFailures/parallel.py @@ -81,7 +81,7 @@ Command('f6', 'f6.in', r'@%(_python_)s mypass.py f5 - $TARGET $SOURCE') def print_build_failures(): from SCons.Script import GetBuildFailures for bf in sorted(GetBuildFailures(), key=lambda t: t.filename): - print "%%s failed: %%s" %% (bf.node, bf.errstr) + print("%%s failed: %%s" %% (bf.node, bf.errstr)) import atexit atexit.register(print_build_failures) @@ -96,7 +96,7 @@ test.run(arguments = '-Q -j 4 .', status = 2, stderr = None) -f4_error = "scons: *** [f4] Error 1\n" +f4_error = "scons: *** [f4] Error 1\n" f5_error = "scons: *** [f5] Error 1\n" error_45 = f4_error + f5_error @@ -129,7 +129,7 @@ if test.stdout() not in [failed_45, failed_54]: test.must_match(test.workpath('f3'), 'f3.in\n') test.must_not_exist(test.workpath('f4')) test.must_not_exist(test.workpath('f5')) -test.must_match(test.workpath('f6'), 'f6.in\n') +test.must_match(test.workpath('f6'), 'f6.in\n') diff --git a/test/GetBuildFailures/serial.py b/test/GetBuildFailures/serial.py index 9c56bb1..fb59c7c 100644 --- a/test/GetBuildFailures/serial.py +++ b/test/GetBuildFailures/serial.py @@ -91,9 +91,9 @@ def print_build_failures(): from SCons.Script import GetBuildFailures for bf in sorted(GetBuildFailures(), key=lambda t: str(t.node)): assert( isinstance(bf, SCons.Errors.BuildError) ) - print "BF: %%s failed (%%s): %%s" %% (bf.node, bf.status, bf.errstr) + print("BF: %%s failed (%%s): %%s" %% (bf.node, bf.status, bf.errstr)) if bf.command: - print "BF: %%s" %% " ".join(Flatten(bf.command)) + print("BF: %%s" %% " ".join(Flatten(bf.command))) import atexit atexit.register(print_build_failures) diff --git a/test/GetOption/help.py b/test/GetOption/help.py index e2eeef7..4f15fe6 100644 --- a/test/GetOption/help.py +++ b/test/GetOption/help.py @@ -34,9 +34,9 @@ test = TestSCons.TestSCons() test.write('SConstruct', """\ if GetOption('help'): - print "GetOption('help') set" + print("GetOption('help') set") else: - print "no help for you" + print("no help for you") """) test.run(arguments = '-q -Q', stdout = "no help for you\n") diff --git a/test/Libs/SharedLibraryIxes.py b/test/Libs/SharedLibraryIxes.py index 6924769..93d67ea 100644 --- a/test/Libs/SharedLibraryIxes.py +++ b/test/Libs/SharedLibraryIxes.py @@ -102,7 +102,7 @@ def nameInLib(source, lib, libname): # When using non-standard prefixes and suffixes, one has to # provide the full name of the library since scons can not know # which of the non-standard extension to use. - # + # # Note that this is not necessarily SHLIBPREFIX and # SHLIBSUFFIX. These are the ixes of the target library, not the # ixes of the library that we are linking against. @@ -130,7 +130,7 @@ def buildAndlinkAgainst(builder, target, source, method, lib, libname, **kw): # for the linker command line... if (isMingw or isCygwin) and len(lib) > 1: lib = lib[1:] - + # Apply the naming method to be tested and call the specified Builder. (source, LIBS) = method(source, lib, libname) #build = builder(target=target, source=source, LIBS=LIBS, **kw) @@ -153,8 +153,8 @@ def buildAndlinkAgainst(builder, target, source, method, lib, libname, **kw): (list(map(str,lib)), list(map(str, build[0].children())), method.__name__, libname, shlibsuffix) return build -def prog(i, - goomethod, goolibprefix, goolibsuffix, +def prog(i, + goomethod, goolibprefix, goolibsuffix, foomethod, foolibprefix, foolibsuffix): '''Build a program @@ -166,7 +166,7 @@ def prog(i, foo_name = foolibprefix+'foo'+str(i)+foolibsuffix prog_name = progprefix+'prog'+str(i)+progsuffix - print 'Prog: %d, %s, %s, %s' % (i, goo_name, foo_name, prog_name) + print('Prog: %d, %s, %s, %s' % (i, goo_name, foo_name, prog_name)) # On Windows, we have to link against the .lib file. if isWindows: @@ -179,7 +179,7 @@ def prog(i, goo_lib = env.SharedLibrary( goo_name, goo_obj, SHLIBSUFFIX=goolibsuffix) foo_lib = buildAndlinkAgainst( - env.SharedLibrary, foo_name, foo_obj, + env.SharedLibrary, foo_name, foo_obj, goomethod, goo_lib, goo_libname, SHLIBSUFFIX=foolibsuffix) prog = buildAndlinkAgainst(env.Program, prog_name, prog_obj, foomethod, foo_lib, foo_libname) @@ -199,8 +199,8 @@ for foolibprefix in prefixes: for goolibsuffix in suffixes: for goomethod in libmethods: tests.append( - (i, - goomethod, goolibprefix, goolibsuffix, + (i, + goomethod, goolibprefix, goolibsuffix, foomethod, foolibprefix, foolibsuffix)) i = i + 1 diff --git a/test/Mkdir.py b/test/Mkdir.py index 4d309bb..8ace476 100644 --- a/test/Mkdir.py +++ b/test/Mkdir.py @@ -178,7 +178,7 @@ test.write(['work3', 'sub1', 'sub11', 'SConscript'], """\ #/sub1/sub11/SConscript------------------------- Import('env test1') test11 = test1 + '/test11' -print 'test11 = ' + test11 +print('test11 = ' + test11) env.Command(Dir(test11), '', Mkdir('$TARGET')) """) diff --git a/test/NodeOps.py b/test/NodeOps.py index 5062b72..1f856c3 100644 --- a/test/NodeOps.py +++ b/test/NodeOps.py @@ -43,7 +43,7 @@ _lib = TestSCons._lib _obj = TestSCons._obj dll_ = TestSCons.dll_ _dll = TestSCons._dll - + if os.name == 'posix': os.environ['LD_LIBRARY_PATH'] = '.' if sys.platform.find('irix') > -1: @@ -71,7 +71,7 @@ if %(_E)s: exists = [N.exists() for N in Nodes] real2 = [os.path.exists(str(N)) for N in Nodes] for N,D,R,E,F in zip(Nodes, derived, real1, exists, real2): - print '%%s: %%s %%s %%s %%s'%%(N,D,R,E,F) + print('%%s: %%s %%s %%s %%s'%%(N,D,R,E,F)) foo.SharedLibrary(target = 'foo', source = 'foo%(_obj)s') bar.SharedLibrary(target = 'bar', source = 'bar%(_obj)s') diff --git a/test/ParseConfig.py b/test/ParseConfig.py index 9bcc440..efb3a75 100644 --- a/test/ParseConfig.py +++ b/test/ParseConfig.py @@ -38,17 +38,17 @@ test_config3 = test.workpath('test-config3') # File node. # It used to be returned as the 'static_libs' output of ParseConfig. test.write(test_config1, """\ -print "-I/usr/include/fum -Ibar -X -arch i386" -print "-L/usr/fax -Lfoo -lxxx abc" +print("-I/usr/include/fum -Ibar -X -arch i386") +print("-L/usr/fax -Lfoo -lxxx abc") """) test.write(test_config2, """\ -print "-L foo -L lib_dir" +print("-L foo -L lib_dir") """) # This is like what wxWidgets does on OSX w/ Universal Binaries test.write(test_config3, """\ -print "-L foo -L lib_dir -isysroot /tmp -arch ppc -arch i386" +print("-L foo -L lib_dir -isysroot /tmp -arch ppc -arch i386") """) test.write('SConstruct1', """ @@ -56,10 +56,10 @@ env = Environment(CPPPATH = [], LIBPATH = [], LIBS = [], CCFLAGS = '-pipe -Wall') env.ParseConfig([r'%(_python_)s', r"%(test_config1)s", "--libs --cflags"]) env.ParseConfig([r'%(_python_)s', r"%(test_config2)s", "--libs --cflags"]) -print env['CPPPATH'] -print env['LIBPATH'] -print [str(x) for x in env['LIBS']] -print env['CCFLAGS'] +print(env['CPPPATH']) +print(env['LIBPATH']) +print([str(x) for x in env['LIBS']]) +print(env['CCFLAGS']) """ % locals()) test.write('SConstruct2', """ @@ -68,10 +68,10 @@ env = Environment(CPPPATH = [], LIBPATH = [], LIBS = [], PYTHON = r'%(_python_)s') env.ParseConfig(r"$PYTHON %(test_config1)s --libs --cflags") env.ParseConfig(r"$PYTHON %(test_config2)s --libs --cflags") -print env['CPPPATH'] -print env['LIBPATH'] -print [str(x) for x in env['LIBS']] -print env['CCFLAGS'] +print(env['CPPPATH']) +print(env['LIBPATH']) +print([str(x) for x in env['LIBS']]) +print(env['CCFLAGS']) """ % locals()) test.write('SConstruct3', """ @@ -79,10 +79,10 @@ env = Environment(CPPPATH = [], LIBPATH = [], LIBS = [], CCFLAGS = '-pipe -Wall', PYTHON = r'%(_python_)s') env.ParseConfig(r"$PYTHON %(test_config3)s --libs --cflags") -print env['CPPPATH'] -print env['LIBPATH'] -print [str(x) for x in env['LIBS']] -print env['CCFLAGS'] +print(env['CPPPATH']) +print(env['LIBPATH']) +print([str(x) for x in env['LIBS']]) +print(env['CCFLAGS']) """ % locals()) good_stdout = """\ diff --git a/test/Platform.py b/test/Platform.py index 23068c4..924dbc7 100644 --- a/test/Platform.py +++ b/test/Platform.py @@ -31,27 +31,27 @@ test = TestSCons.TestSCons() test.write('SConstruct', """ env = Environment() Platform('cygwin')(env) -print "'%s'" % env['PROGSUFFIX'] +print("'%s'" % env['PROGSUFFIX']) assert env['SHELL'] == 'sh' Platform('os2')(env) -print "'%s'" % env['PROGSUFFIX'] +print("'%s'" % env['PROGSUFFIX']) env.Platform('posix') -print "'%s'" % env['PROGSUFFIX'] +print("'%s'" % env['PROGSUFFIX']) Platform('win32')(env) -print "'%s'" % env['PROGSUFFIX'] +print("'%s'" % env['PROGSUFFIX']) SConscript('SConscript') """) test.write('SConscript', """ env = Environment() Platform('cygwin')(env) -print "'%s'" % env['LIBSUFFIX'] +print("'%s'" % env['LIBSUFFIX']) Platform('os2')(env) -print "'%s'" % env['LIBSUFFIX'] +print("'%s'" % env['LIBSUFFIX']) env.Platform('posix') -print "'%s'" % env['LIBSUFFIX'] +print("'%s'" % env['LIBSUFFIX']) Platform('win32')(env) -print "'%s'" % env['LIBSUFFIX'] +print("'%s'" % env['LIBSUFFIX']) """) expect = test.wrap_stdout(read_str = """'.exe' diff --git a/test/QT/QTFLAGS.py b/test/QT/QTFLAGS.py index 008397a..f6aa00f 100644 --- a/test/QT/QTFLAGS.py +++ b/test/QT/QTFLAGS.py @@ -136,7 +136,7 @@ int main() { """) test.run(chdir = 'work1', arguments = "mytest" + _exe) - + test.must_exist(['work1', 'mmmmocFromH.cxx'], ['work1', 'mocmocFromCpp.inl'], ['work1', 'an_ui_file.cxx'], @@ -168,15 +168,15 @@ env1 = Environment(tools=['qt'], cpppath = env1.subst('$CPPPATH') if os.path.normpath(cpppath) != os.path.join(r'%(QTDIR)s', 'h64'): - print cpppath + print(cpppath) Exit(1) libpath = env1.subst('$LIBPATH') if os.path.normpath(libpath) != os.path.join(r'%(QTDIR)s', 'lib64'): - print libpath + print(libpath) Exit(2) qt_moc = env1.subst('$QT_MOC') if os.path.normpath(qt_moc) != os.path.join(r'%(QTDIR)s', 'bin64', 'moc'): - print qt_moc + print(qt_moc) Exit(3) env2 = Environment(tools=['default', 'qt'], diff --git a/test/QT/manual.py b/test/QT/manual.py index d911fb3..1f140ae 100644 --- a/test/QT/manual.py +++ b/test/QT/manual.py @@ -58,7 +58,7 @@ env.Ignore( moc, moc ) sources.extend(env.Uic(['include/uic_fff.hpp', 'fff.cpp', 'fff.moc.cpp'], 'ui/fff.ui')[1:]) -print list(map(str,sources)) +print(list(map(str,sources))) env.Program(target='aaa', source=sources, CPPPATH=['$CPPPATH', './include'], @@ -68,7 +68,7 @@ env.Program(target='aaa', test.write('aaa.cpp', r""" #include "aaa.h" """) - + test.write(['include', 'aaa.h'], r""" #include "my_qobject.h" void aaa(void) Q_OBJECT; @@ -91,7 +91,7 @@ void ccc(void) test.write('ddd.cpp', r""" #include "ddd.h" """) - + test.write(['include', 'ddd.h'], r""" #include "my_qobject.h" void ddd(void) Q_OBJECT; diff --git a/test/tool_args.py b/test/tool_args.py index 692f6a5..b0f69ef 100644 --- a/test/tool_args.py +++ b/test/tool_args.py @@ -38,13 +38,13 @@ test = TestSCons.TestSCons() test.write('SConstruct', """ # Test passing kw args to Tool constructor env1 = Environment(tools=[Tool('FooTool', toolpath=['.'], kw1='kw1val')]) -print "env1['TOOL_FOO'] =", env1.get('TOOL_FOO') -print "env1['kw1'] =", env1.get('kw1') +print("env1['TOOL_FOO'] =", env1.get('TOOL_FOO')) +print("env1['kw1'] =", env1.get('kw1')) # Test apply_tools taking a list of (name, kwargs_dict) env2 = Environment(tools=[('FooTool', {'kw2':'kw2val'})], toolpath=['.']) -print "env2['TOOL_FOO'] =", env2.get('TOOL_FOO') -print "env2['kw2'] =", env2.get('kw2') +print("env2['TOOL_FOO'] =", env2.get('TOOL_FOO')) +print("env2['kw2'] =", env2.get('kw2')) """) diff --git a/test/toolpath/basic.py b/test/toolpath/basic.py index e1e6f3c..eedd06e 100644 --- a/test/toolpath/basic.py +++ b/test/toolpath/basic.py @@ -33,63 +33,63 @@ test = TestSCons.TestSCons() test.write('SConstruct', """ def foo(env): env['TOOL_FOO'] = 1 - + env1 = Environment(tools=[foo, 'bar'], toolpath=['tools']) -print "env1['TOOL_FOO'] =", env1.get('TOOL_FOO') -print "env1['TOOL_BAR'] =", env1.get('TOOL_BAR') +print("env1['TOOL_FOO'] =", env1.get('TOOL_FOO')) +print("env1['TOOL_BAR'] =", env1.get('TOOL_BAR')) # pick a built-in tool with pretty simple behavior env2 = Environment(tools=['SCCS']) -print "env2['SCCS'] =", env2.get('SCCS') -print "env2['TOOL_SCCS1'] =", env2.get('TOOL_SCCS1') -print "env2['TOOL_SCCS2'] =", env2.get('TOOL_SCCS2') +print("env2['SCCS'] =", env2.get('SCCS') +print("env2['TOOL_SCCS1'] =", env2.get('TOOL_SCCS1')) +print("env2['TOOL_SCCS2'] =", env2.get('TOOL_SCCS2')) env3 = Environment(tools=['SCCS'], toolpath=['.']) -print "env3['SCCS'] =", env3.get('SCCS') -print "env3['TOOL_SCCS1'] =", env3.get('TOOL_SCCS1') -print "env3['TOOL_SCCS2'] =", env3.get('TOOL_SCCS2') +print("env3['SCCS'] =", env3.get('SCCS') +print("env3['TOOL_SCCS1'] =", env3.get('TOOL_SCCS1')) +print("env3['TOOL_SCCS2'] =", env3.get('TOOL_SCCS2')) env4 = Environment(tools=['SCCS'], toolpath=['tools']) -print "env4['SCCS'] =", env4.get('SCCS') -print "env4['TOOL_SCCS1'] =", env4.get('TOOL_SCCS1') -print "env4['TOOL_SCCS2'] =", env4.get('TOOL_SCCS2') +print("env4['SCCS'] =", env4.get('SCCS')) +print("env4['TOOL_SCCS1'] =", env4.get('TOOL_SCCS1')) +print("env4['TOOL_SCCS2'] =", env4.get('TOOL_SCCS2')) env5 = Environment(tools=['SCCS'], toolpath=['tools', '.']) -print "env5['SCCS'] =", env5.get('SCCS') -print "env5['TOOL_SCCS1'] =", env5.get('TOOL_SCCS1') -print "env5['TOOL_SCCS2'] =", env5.get('TOOL_SCCS2') +print("env5['SCCS'] =", env5.get('SCCS')) +print("env5['TOOL_SCCS1'] =", env5.get('TOOL_SCCS1')) +print("env5['TOOL_SCCS2'] =", env5.get('TOOL_SCCS2')) env6 = Environment(tools=['SCCS'], toolpath=['.', 'tools']) -print "env6['SCCS'] =", env6.get('SCCS') -print "env6['TOOL_SCCS1'] =", env6.get('TOOL_SCCS1') -print "env6['TOOL_SCCS2'] =", env6.get('TOOL_SCCS2') +print("env6['SCCS'] =", env6.get('SCCS')) +print("env6['TOOL_SCCS1'] =", env6.get('TOOL_SCCS1')) +print("env6['TOOL_SCCS2'] =", env6.get('TOOL_SCCS2')) env7 = Environment(TOOLPATH="tools", tools=['SCCS'], toolpath=['$TOOLPATH']) -print "env7['SCCS'] =", env7.get('SCCS') -print "env7['TOOL_SCCS1'] =", env7.get('TOOL_SCCS1') -print "env7['TOOL_SCCS2'] =", env7.get('TOOL_SCCS2') +print("env7['SCCS'] =", env7.get('SCCS')) +print("env7['TOOL_SCCS1'] =", env7.get('TOOL_SCCS1')) +print("env7['TOOL_SCCS2'] =", env7.get('TOOL_SCCS2')) env8 = Environment(tools=[]) env8.Tool('SCCS', toolpath=['tools']) -print "env8['SCCS'] =", env8.get('SCCS') -print "env8['TOOL_SCCS1'] =", env8.get('TOOL_SCCS1') -print "env8['TOOL_SCCS2'] =", env8.get('TOOL_SCCS2') +print("env8['SCCS'] =", env8.get('SCCS')) +print("env8['TOOL_SCCS1'] =", env8.get('TOOL_SCCS1')) +print("env8['TOOL_SCCS2'] =", env8.get('TOOL_SCCS2')) env9 = Environment(tools=[]) Tool('SCCS', toolpath=['tools'])(env9) -print "env9['SCCS'] =", env9.get('SCCS') -print "env9['TOOL_SCCS1'] =", env9.get('TOOL_SCCS1') -print "env9['TOOL_SCCS2'] =", env9.get('TOOL_SCCS2') +print("env9['SCCS'] =", env9.get('SCCS')) +print("env9['TOOL_SCCS1'] =", env9.get('TOOL_SCCS1')) +print("env9['TOOL_SCCS2'] =", env9.get('TOOL_SCCS2')) env0 = Environment(TOOLPATH='tools', tools=[]) env0.Tool('SCCS', toolpath=['$TOOLPATH']) -print "env0['SCCS'] =", env0.get('SCCS') -print "env0['TOOL_SCCS1'] =", env0.get('TOOL_SCCS1') -print "env0['TOOL_SCCS2'] =", env0.get('TOOL_SCCS2') +print("env0['SCCS'] =", env0.get('SCCS')) +print("env0['TOOL_SCCS1'] =", env0.get('TOOL_SCCS1')) +print("env0['TOOL_SCCS2'] =", env0.get('TOOL_SCCS2')) base = Environment(tools=[], toolpath=['tools']) derived = base.Clone(tools=['bar']) -print "derived['TOOL_BAR'] =", derived.get('TOOL_BAR') +print("derived['TOOL_BAR'] =", derived.get('TOOL_BAR')) """) test.write('SCCS.py', r"""\ |