mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2026-03-27 17:45:13 +08:00
[Tools] Change building script for Py3
This commit is contained in:
@@ -73,7 +73,7 @@ def CBProject(target, script, program):
|
||||
|
||||
root = tree.getroot()
|
||||
|
||||
out = file(target, 'wb')
|
||||
out = open(target, 'w')
|
||||
out.write('<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>\n')
|
||||
|
||||
ProjectFiles = []
|
||||
@@ -90,7 +90,7 @@ def CBProject(target, script, program):
|
||||
|
||||
# SECTION 2.
|
||||
# write head include path
|
||||
if building.Env.has_key('CPPPATH'):
|
||||
if 'CPPPATH' in building.Env:
|
||||
cpp_path = building.Env['CPPPATH']
|
||||
paths = set()
|
||||
for path in cpp_path:
|
||||
@@ -114,7 +114,7 @@ def CBProject(target, script, program):
|
||||
# write link flags
|
||||
'''
|
||||
# write lib dependence
|
||||
if building.Env.has_key('LIBS'):
|
||||
if 'LIBS' in building.Env:
|
||||
for elem in tree.iter(tag='Tool'):
|
||||
if elem.attrib['Name'] == 'VCLinkerTool':
|
||||
break
|
||||
@@ -123,7 +123,7 @@ def CBProject(target, script, program):
|
||||
elem.set('AdditionalDependencies', libs)
|
||||
|
||||
# write lib include path
|
||||
if building.Env.has_key('LIBPATH'):
|
||||
if 'LIBPATH' in building.Env:
|
||||
lib_path = building.Env['LIBPATH']
|
||||
paths = set()
|
||||
for path in lib_path:
|
||||
|
||||
Reference in New Issue
Block a user