lbkit 0.5.16__tar.gz → 0.5.17__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {lbkit-0.5.16/lbkit.egg-info → lbkit-0.5.17}/PKG-INFO +1 -1
- lbkit-0.5.17/lbkit/__init__.py +2 -0
- {lbkit-0.5.16 → lbkit-0.5.17}/lbkit/codegen/idf_interface.py +8 -8
- {lbkit-0.5.16 → lbkit-0.5.17}/lbkit/component/build.py +11 -11
- {lbkit-0.5.16 → lbkit-0.5.17}/lbkit/component/template/deploy.mako +23 -1
- {lbkit-0.5.16 → lbkit-0.5.17/lbkit.egg-info}/PKG-INFO +1 -1
- lbkit-0.5.16/lbkit/__init__.py +0 -2
- {lbkit-0.5.16 → lbkit-0.5.17}/AUTHORS +0 -0
- {lbkit-0.5.16 → lbkit-0.5.17}/LICENSE +0 -0
- {lbkit-0.5.16 → lbkit-0.5.17}/MANIFEST.in +0 -0
- {lbkit-0.5.16 → lbkit-0.5.17}/README.md +0 -0
- {lbkit-0.5.16 → lbkit-0.5.17}/lbkit/ci_robot/__init__.py +0 -0
- {lbkit-0.5.16 → lbkit-0.5.17}/lbkit/ci_robot/gitee.py +0 -0
- {lbkit-0.5.16 → lbkit-0.5.17}/lbkit/cli.py +0 -0
- {lbkit-0.5.16 → lbkit-0.5.17}/lbkit/codegen/__init__.py +0 -0
- {lbkit-0.5.16 → lbkit-0.5.17}/lbkit/codegen/codegen.py +0 -0
- {lbkit-0.5.16 → lbkit-0.5.17}/lbkit/codegen/ctype_defination.py +0 -0
- {lbkit-0.5.16 → lbkit-0.5.17}/lbkit/codegen/renderer.py +0 -0
- {lbkit-0.5.16 → lbkit-0.5.17}/lbkit/codegen/template/client.c.mako +0 -0
- {lbkit-0.5.16 → lbkit-0.5.17}/lbkit/codegen/template/client.h.mako +0 -0
- {lbkit-0.5.16 → lbkit-0.5.17}/lbkit/codegen/template/interface.c.mako +0 -0
- {lbkit-0.5.16 → lbkit-0.5.17}/lbkit/codegen/template/interface.introspect.xml.mako +0 -0
- {lbkit-0.5.16 → lbkit-0.5.17}/lbkit/codegen/template/public.c.mako +0 -0
- {lbkit-0.5.16 → lbkit-0.5.17}/lbkit/codegen/template/public.h.mako +0 -0
- {lbkit-0.5.16 → lbkit-0.5.17}/lbkit/codegen/template/server.c.mako +0 -0
- {lbkit-0.5.16 → lbkit-0.5.17}/lbkit/codegen/template/server.h.mako +0 -0
- {lbkit-0.5.16 → lbkit-0.5.17}/lbkit/component/__init__.py +0 -0
- {lbkit-0.5.16 → lbkit-0.5.17}/lbkit/component/arg_parser.py +0 -0
- {lbkit-0.5.16 → lbkit-0.5.17}/lbkit/component/template/conanbase.mako +0 -0
- {lbkit-0.5.16 → lbkit-0.5.17}/lbkit/component/test.py +0 -0
- {lbkit-0.5.16 → lbkit-0.5.17}/lbkit/errors.py +0 -0
- {lbkit-0.5.16 → lbkit-0.5.17}/lbkit/helper.py +0 -0
- {lbkit-0.5.16 → lbkit-0.5.17}/lbkit/integration/__init__.py +0 -0
- {lbkit-0.5.16 → lbkit-0.5.17}/lbkit/integration/build_image.py +0 -0
- {lbkit-0.5.16 → lbkit-0.5.17}/lbkit/integration/build_manifest.py +0 -0
- {lbkit-0.5.16 → lbkit-0.5.17}/lbkit/integration/build_prepare.py +0 -0
- {lbkit-0.5.16 → lbkit-0.5.17}/lbkit/integration/build_rootfs.py +0 -0
- {lbkit-0.5.16 → lbkit-0.5.17}/lbkit/integration/config.py +0 -0
- {lbkit-0.5.16 → lbkit-0.5.17}/lbkit/integration/task.py +0 -0
- {lbkit-0.5.16 → lbkit-0.5.17}/lbkit/integration/template/conanfile.py.mako +0 -0
- {lbkit-0.5.16 → lbkit-0.5.17}/lbkit/lbkit.py +0 -0
- {lbkit-0.5.16 → lbkit-0.5.17}/lbkit/log.py +0 -0
- {lbkit-0.5.16 → lbkit-0.5.17}/lbkit/misc.py +0 -0
- {lbkit-0.5.16 → lbkit-0.5.17}/lbkit/tools.py +0 -0
- {lbkit-0.5.16 → lbkit-0.5.17}/lbkit.egg-info/SOURCES.txt +0 -0
- {lbkit-0.5.16 → lbkit-0.5.17}/lbkit.egg-info/dependency_links.txt +0 -0
- {lbkit-0.5.16 → lbkit-0.5.17}/lbkit.egg-info/entry_points.txt +0 -0
- {lbkit-0.5.16 → lbkit-0.5.17}/lbkit.egg-info/requires.txt +0 -0
- {lbkit-0.5.16 → lbkit-0.5.17}/lbkit.egg-info/top_level.txt +0 -0
- {lbkit-0.5.16 → lbkit-0.5.17}/setup.cfg +0 -0
- {lbkit-0.5.16 → lbkit-0.5.17}/setup.py +0 -0
|
@@ -39,14 +39,14 @@ class IdfAnnotation():
|
|
|
39
39
|
else:
|
|
40
40
|
raise IDFException(f"the value of {name} with type error, must be a string or bool, but real type is {type(value)}")
|
|
41
41
|
|
|
42
|
-
# "pattern": "^(readwrite|readonly|writeonly|deprecated|
|
|
42
|
+
# "pattern": "^(readwrite|readonly|writeonly|deprecated|hidden|emits_change|emits_invalidation|refval|refobj)(,(readwrite|readonly|writeonly|deprecated|hidden|emits_change|emits_invalidation|refobj|refval))*$"
|
|
43
43
|
ANNOTATION_MAP = {
|
|
44
44
|
"deprecated": IdfAnnotation("org.freedesktop.DBus.Deprecated", "true"),
|
|
45
|
-
"
|
|
46
|
-
"
|
|
47
|
-
"
|
|
45
|
+
"emits_change": IdfAnnotation("org.freedesktop.DBus.Property.EmitsChangedSignal", "true"),
|
|
46
|
+
"emits_invalidation": IdfAnnotation("org.freedesktop.DBus.Property.EmitsChangedSignal", "invalidates"),
|
|
47
|
+
"const": IdfAnnotation("org.freedesktop.DBus.Property.EmitsChangedSignal", "const"),
|
|
48
48
|
"emits_false": IdfAnnotation("org.freedesktop.DBus.Property.EmitsChangedSignal", "false"),
|
|
49
|
-
"
|
|
49
|
+
"hidden": IdfAnnotation("com.litebmc.Dbus.Property.Private", "const"),
|
|
50
50
|
"refobj": IdfAnnotation("com.litebmc.Dbus.Property.RefObject", "true"),
|
|
51
51
|
"required": IdfAnnotation("com.litebmc.Dbus.Property.Required", "true"),
|
|
52
52
|
}
|
|
@@ -511,7 +511,7 @@ class IdfProperty(IdfCtypeRender):
|
|
|
511
511
|
self.description = prop_data.get("description", "")
|
|
512
512
|
flags = prop_data.get("flags", "").split(",")
|
|
513
513
|
self.flags = flags
|
|
514
|
-
self.private = True if ("
|
|
514
|
+
self.private = True if ("hidden" in flags) else False
|
|
515
515
|
self.deprecated = True if ("deprecated" in flags) else False
|
|
516
516
|
# refobj的ctype只能是s或as
|
|
517
517
|
if "refobj" in flags and self.ctype != "string" and self.ctype != "array[string]":
|
|
@@ -528,11 +528,11 @@ class IdfProperty(IdfCtypeRender):
|
|
|
528
528
|
c_flags = []
|
|
529
529
|
if self.private:
|
|
530
530
|
c_flags.append("PM_FLAGS_PROPERTY_PRIVATE")
|
|
531
|
-
elif "
|
|
531
|
+
elif "const" in flags:
|
|
532
532
|
c_flags.append("PM_FLAGS_PROPERTY_EMIT_CONST")
|
|
533
533
|
elif "emits_false" in flags:
|
|
534
534
|
c_flags.append("PM_FLAGS_PROPERTY_EMIT_FALSE")
|
|
535
|
-
elif "
|
|
535
|
+
elif "emits_invalidation" in flags:
|
|
536
536
|
c_flags.append("PM_FLAGS_PROPERTY_EMIT_INVALIDATES")
|
|
537
537
|
else:
|
|
538
538
|
c_flags.append("PM_FLAGS_PROPERTY_EMIT_TRUE")
|
|
@@ -59,7 +59,6 @@ class BuildComponent():
|
|
|
59
59
|
self.build_type = self.options.build_type
|
|
60
60
|
self.profile = self.options.profile
|
|
61
61
|
self.profile_build = self.options.profile_build
|
|
62
|
-
self.runtime_packages = []
|
|
63
62
|
self.verbose = False if self.options.summary else True
|
|
64
63
|
self.from_source = self.options.from_source
|
|
65
64
|
# 当前组件及其依赖将被部署到rootfs目录
|
|
@@ -134,14 +133,8 @@ class BuildComponent():
|
|
|
134
133
|
if self.options.test:
|
|
135
134
|
for rt in requires.get("test", []):
|
|
136
135
|
deps.append(rt)
|
|
137
|
-
conan = rt.get("conan")
|
|
138
|
-
if conan is not None:
|
|
139
|
-
self.runtime_packages.append(conan)
|
|
140
136
|
for rt in requires.get("compile", []):
|
|
141
137
|
deps.append(rt)
|
|
142
|
-
conan = rt.get("conan")
|
|
143
|
-
if conan is not None:
|
|
144
|
-
self.runtime_packages.append(conan)
|
|
145
138
|
|
|
146
139
|
for dep in deps:
|
|
147
140
|
option = dep.get("option", {})
|
|
@@ -179,7 +172,7 @@ class BuildComponent():
|
|
|
179
172
|
# 生成部署deploy命令
|
|
180
173
|
lookup = TemplateLookup(directories=os.path.join(lb_cwd, "template"))
|
|
181
174
|
template = lookup.get_template("deploy.mako")
|
|
182
|
-
deploy = template.render(lookup=lookup, pkg=self.pkg, packages=
|
|
175
|
+
deploy = template.render(lookup=lookup, pkg=self.pkg, packages=[])
|
|
183
176
|
dir = os.path.join(cwd, ".temp", "deploy")
|
|
184
177
|
# 创建临时目录并写入conanfile.py文件
|
|
185
178
|
os.makedirs(dir, exist_ok=True)
|
|
@@ -191,6 +184,11 @@ class BuildComponent():
|
|
|
191
184
|
|
|
192
185
|
cmd = self.base_cmd.replace(self.package, "")
|
|
193
186
|
cmd = f"conan create . {cmd} --build=missing -tf=\"\""
|
|
187
|
+
if self.options.test:
|
|
188
|
+
cmd += " -o deploy/*:test=True"
|
|
189
|
+
for pkg_option in self.options.pkg_options:
|
|
190
|
+
if not pkg_option.startswith(self.name + "/"):
|
|
191
|
+
cmd += " -o " + pkg_option
|
|
194
192
|
tools.exec(cmd, verbose=True)
|
|
195
193
|
os.chdir(cwd)
|
|
196
194
|
|
|
@@ -203,9 +201,7 @@ class BuildComponent():
|
|
|
203
201
|
# 生成部署deploy命令
|
|
204
202
|
lookup = TemplateLookup(directories=os.path.join(lb_cwd, "template"))
|
|
205
203
|
template = lookup.get_template("deploy.mako")
|
|
206
|
-
|
|
207
|
-
packages.append(self.package)
|
|
208
|
-
deploy = template.render(lookup=lookup, pkg=self.pkg, packages=packages)
|
|
204
|
+
deploy = template.render(lookup=lookup, pkg=self.pkg, packages=[self.package])
|
|
209
205
|
dir = os.path.join(cwd, ".temp", "deploy")
|
|
210
206
|
# 创建临时目录并写入conanfile.py文件
|
|
211
207
|
os.makedirs(dir, exist_ok=True)
|
|
@@ -217,6 +213,10 @@ class BuildComponent():
|
|
|
217
213
|
|
|
218
214
|
cmd = self.base_cmd.replace(self.package, "")
|
|
219
215
|
cmd = f"conan graph info . {cmd} --build=missing -f json --filter=ref --filter=package_id --filter=context"
|
|
216
|
+
if self.options.test:
|
|
217
|
+
cmd += " -o deploy/*:test=True"
|
|
218
|
+
for pkg_option in self.options.pkg_options:
|
|
219
|
+
cmd += " -o " + pkg_option
|
|
220
220
|
res = tools.run(cmd).stdout.strip()
|
|
221
221
|
graph = json.loads(res)
|
|
222
222
|
nodes = graph.get("graph", {}).get("nodes", {})
|
|
@@ -34,9 +34,31 @@ class DeployConan(ConanFile):
|
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
def requirements(self):
|
|
37
|
-
|
|
37
|
+
% for package in packages:
|
|
38
38
|
self.requires("${package}")
|
|
39
|
+
% endfor
|
|
40
|
+
% if len(pkg.get("requires", {})) > 0:
|
|
41
|
+
% for conan in pkg["requires"].get("compile", []):
|
|
42
|
+
% if conan.get("when") is not None:
|
|
43
|
+
if ${conan.get("when")}:
|
|
44
|
+
self.requires("${conan.get("conan")}")
|
|
45
|
+
% else:
|
|
46
|
+
self.requires("${conan.get("conan")}")
|
|
47
|
+
% endif
|
|
39
48
|
% endfor
|
|
49
|
+
<%test_requires=pkg["requires"].get("test", [])%>\
|
|
50
|
+
% if len(test_requires):
|
|
51
|
+
if self.options.test == True:
|
|
52
|
+
% for conan in test_requires:
|
|
53
|
+
% if conan.get("when") is not None:
|
|
54
|
+
if ${conan.get("when")}:
|
|
55
|
+
self.requires("${conan.get("conan")}")
|
|
56
|
+
% else:
|
|
57
|
+
self.requires("${conan.get("conan")}")
|
|
58
|
+
% endif
|
|
59
|
+
% endfor
|
|
60
|
+
% endif
|
|
61
|
+
% endif
|
|
40
62
|
pass
|
|
41
63
|
|
|
42
64
|
def configure(self):
|
lbkit-0.5.16/lbkit/__init__.py
DELETED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|