diff --git a/Builds/Test.py b/Builds/Test.py index 70f53a1d58..8ff129a281 100755 --- a/Builds/Test.py +++ b/Builds/Test.py @@ -78,16 +78,16 @@ CMAKE_UNITY_COMBOS = { '' : [['rippled', 'rippled_classic'], CMAKE_UNITY_CONFIGS if IS_WINDOWS: CMAKE_DIR_TARGETS = { ('msvc' + unity,) : targets for unity, targets in - CMAKE_UNITY_COMBOS.iteritems() } + CMAKE_UNITY_COMBOS.items() } elif IS_OS_X: CMAKE_DIR_TARGETS = { (build + unity,) : targets for build in ['debug', 'release'] - for unity, targets in CMAKE_UNITY_COMBOS.iteritems() } + for unity, targets in CMAKE_UNITY_COMBOS.items() } else: CMAKE_DIR_TARGETS = { (cc + "." + build + unity,) : targets for cc in ['gcc', 'clang'] for build in ['debug', 'release', 'coverage', 'profile'] - for unity, targets in CMAKE_UNITY_COMBOS.iteritems() } + for unity, targets in CMAKE_UNITY_COMBOS.items() } # list of tuples of all possible options if IS_WINDOWS or IS_OS_X: @@ -450,7 +450,7 @@ def main(): ARGS.build_option = list(ARGS.extra_args) for args in generator_options: - for build_dirs, (build_targets, build_configs) in build_dir_targets.iteritems(): + for build_dirs, (build_targets, build_configs) in build_dir_targets.items(): if not build_dirs: build_dirs = ('default',) if not build_targets: diff --git a/SConstruct b/SConstruct index f1409d3301..619c6c8d79 100644 --- a/SConstruct +++ b/SConstruct @@ -422,7 +422,7 @@ def get_libs(lib, static): try: cmd = ['pkg-config', '--static', '--libs', lib] libs = subprocess.check_output(cmd, - stderr=subprocess.STDOUT).strip() + stderr=subprocess.STDOUT).strip().decode("utf-8") all_libs = [l[2:] for l in libs.split() if l.startswith('-l')] if not static: return ([], all_libs) @@ -1162,7 +1162,7 @@ for tu_style in ['classic', 'unity']: os.path.join(variant_dir, 'proto') : os.path.join (build_dir, 'proto'), } - for dest, source in variant_dirs.iteritems(): + for dest, source in variant_dirs.items(): env.VariantDir(dest, source, duplicate=0) object_builder = ObjectBuilder(env, variant_dirs) @@ -1265,7 +1265,7 @@ for tu_style in ['classic', 'unity']: [object_builder.env] + object_builder.child_envs + [base], dest_file='build.ninja') -for key, value in aliases.iteritems(): +for key, value in aliases.items(): env.Alias(key, value) vcxproj = base.VSProject( @@ -1306,6 +1306,6 @@ def do_count(target, source, env): lines = 0 for f in testfiles: lines = lines + sum(1 for line in open(f)) - print "Total unit test lines: %d" % lines + print ("Total unit test lines: %d" % lines) PhonyTargets(env, count = do_count) diff --git a/src/ripple/beast/site_scons/Beast.py b/src/ripple/beast/site_scons/Beast.py index 5b2fe849a4..315cec00c3 100644 --- a/src/ripple/beast/site_scons/Beast.py +++ b/src/ripple/beast/site_scons/Beast.py @@ -111,7 +111,7 @@ def printChildren(target): def variantFile(path, variant_dirs): '''Returns the path to the corresponding dict entry in variant_dirs''' path = str(path) - for dest, source in variant_dirs.iteritems(): + for dest, source in variant_dirs.items(): common = os.path.commonprefix([path, source]) if common == source: return os.path.join(dest, path[len(common)+1:]) diff --git a/src/ripple/beast/site_scons/site_tools/VSProject.py b/src/ripple/beast/site_scons/site_tools/VSProject.py index 6a8ebe2e6d..41f6ed56d1 100644 --- a/src/ripple/beast/site_scons/site_tools/VSProject.py +++ b/src/ripple/beast/site_scons/site_tools/VSProject.py @@ -816,12 +816,12 @@ class _ProjectGenerator(object): def build(self): try: self.project_file = open(str(self.project_node), 'wb') - except IOError, detail: + except (IOError, detail): raise SCons.Errors.InternalError('Unable to open "' + str(self.project_node) + '" for writing:' + str(detail)) try: self.filters_file = open(str(self.filters_node), 'wb') - except IOError, detail: + except (IOError, detail): raise SCons.Errors.InternalError('Unable to open "' + str(self.filters_node) + '" for writing:' + str(detail)) self.writeProject()