Support python3 in SCons

This commit is contained in:
JoelKatz
2017-11-15 15:42:19 -08:00
committed by Brad Chase
parent a4a43a4de9
commit 5a9c3c797c
4 changed files with 11 additions and 11 deletions

View File

@@ -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:])

View File

@@ -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()