[Tools] Change building script for Py3

This commit is contained in:
Bernard Xiong
2018-11-10 18:29:08 +08:00
parent b69baa9658
commit d687cfb228
15 changed files with 150 additions and 87 deletions
+2 -2
View File
@@ -6,7 +6,7 @@ def genconfig() :
PreProcessor = SCons.cpp.PreProcessor()
try:
f = file('rtconfig.h', 'r')
f = open('rtconfig.h', 'r')
contents = f.read()
f.close()
except :
@@ -16,7 +16,7 @@ def genconfig() :
options = PreProcessor.cpp_namespace
try:
f = file('.config', 'w')
f = open('.config', 'w')
for (opt, value) in options.items():
if type(value) == type(1):
f.write("CONFIG_%s=%d\n" % (opt, value))