MCPcopy Create free account
hub / github.com/RT-Thread/rt-thread / SDKAddGroup

Function SDKAddGroup

tools/targets/ses.py:12–30  ·  view source on GitHub ↗
(parent, name, files, project_path)

Source from the content-addressed store, hash-verified

10from utils import ProjectInfo
11
12def SDKAddGroup(parent, name, files, project_path):
13 # don't add an empty group
14 if len(files) == 0:
15 return
16
17 group = SubElement(parent, 'folder', attrib={'Name': name})
18
19 for f in files:
20 fn = f.rfile()
21 name = fn.name
22 path = os.path.dirname(fn.abspath)
23
24 basename = os.path.basename(path)
25 path = _make_path_relative(project_path, path)
26 elm_attr_name = os.path.join(path, name)
27
28 file = SubElement(group, 'file', attrib={'file_name': elm_attr_name})
29
30 return group
31
32def SESProject(env) :
33 target = 'project.emProject'

Callers 1

SESProjectFunction · 0.70

Calls 2

_make_path_relativeFunction · 0.90
joinMethod · 0.45

Tested by

no test coverage detected