lbkit 0.9.6__tar.gz → 0.9.7__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.
Files changed (68) hide show
  1. {lbkit-0.9.6/lbkit.egg-info → lbkit-0.9.7}/PKG-INFO +1 -1
  2. lbkit-0.9.7/lbkit/__init__.py +2 -0
  3. {lbkit-0.9.6 → lbkit-0.9.7}/lbkit/codegen/codegen.py +4 -1
  4. {lbkit-0.9.6 → lbkit-0.9.7}/lbkit/codegen/idf_interface.py +6 -1
  5. {lbkit-0.9.6 → lbkit-0.9.7}/lbkit/codegen/template/client.c.mako +1 -1
  6. {lbkit-0.9.6 → lbkit-0.9.7}/lbkit/codegen/template/server.c.mako +1 -1
  7. {lbkit-0.9.6 → lbkit-0.9.7/lbkit.egg-info}/PKG-INFO +1 -1
  8. lbkit-0.9.6/lbkit/__init__.py +0 -2
  9. {lbkit-0.9.6 → lbkit-0.9.7}/AUTHORS +0 -0
  10. {lbkit-0.9.6 → lbkit-0.9.7}/LICENSE +0 -0
  11. {lbkit-0.9.6 → lbkit-0.9.7}/MANIFEST.in +0 -0
  12. {lbkit-0.9.6 → lbkit-0.9.7}/README.md +0 -0
  13. {lbkit-0.9.6 → lbkit-0.9.7}/lbkit/build_conan_parallel.py +0 -0
  14. {lbkit-0.9.6 → lbkit-0.9.7}/lbkit/ci_robot/__init__.py +0 -0
  15. {lbkit-0.9.6 → lbkit-0.9.7}/lbkit/cli.py +0 -0
  16. {lbkit-0.9.6 → lbkit-0.9.7}/lbkit/codegen/__init__.py +0 -0
  17. {lbkit-0.9.6 → lbkit-0.9.7}/lbkit/codegen/ctype_defination.py +0 -0
  18. {lbkit-0.9.6 → lbkit-0.9.7}/lbkit/codegen/renderer.py +0 -0
  19. {lbkit-0.9.6 → lbkit-0.9.7}/lbkit/codegen/template/client.h.mako +0 -0
  20. {lbkit-0.9.6 → lbkit-0.9.7}/lbkit/codegen/template/interface.c.mako +0 -0
  21. {lbkit-0.9.6 → lbkit-0.9.7}/lbkit/codegen/template/interface.introspect.xml.mako +0 -0
  22. {lbkit-0.9.6 → lbkit-0.9.7}/lbkit/codegen/template/public.c.mako +0 -0
  23. {lbkit-0.9.6 → lbkit-0.9.7}/lbkit/codegen/template/public.h.mako +0 -0
  24. {lbkit-0.9.6 → lbkit-0.9.7}/lbkit/codegen/template/server.h.mako +0 -0
  25. {lbkit-0.9.6 → lbkit-0.9.7}/lbkit/component/__init__.py +0 -0
  26. {lbkit-0.9.6 → lbkit-0.9.7}/lbkit/component/arg_parser.py +0 -0
  27. {lbkit-0.9.6 → lbkit-0.9.7}/lbkit/component/build.py +0 -0
  28. {lbkit-0.9.6 → lbkit-0.9.7}/lbkit/component/template/conanbase.mako +0 -0
  29. {lbkit-0.9.6 → lbkit-0.9.7}/lbkit/component/template/deploy.mako +0 -0
  30. {lbkit-0.9.6 → lbkit-0.9.7}/lbkit/component/test.py +0 -0
  31. {lbkit-0.9.6 → lbkit-0.9.7}/lbkit/errors.py +0 -0
  32. {lbkit-0.9.6 → lbkit-0.9.7}/lbkit/helper.py +0 -0
  33. {lbkit-0.9.6 → lbkit-0.9.7}/lbkit/lbkit.py +0 -0
  34. {lbkit-0.9.6 → lbkit-0.9.7}/lbkit/log.py +0 -0
  35. {lbkit-0.9.6 → lbkit-0.9.7}/lbkit/misc.py +0 -0
  36. {lbkit-0.9.6 → lbkit-0.9.7}/lbkit/tasks/__init__.py +0 -0
  37. {lbkit-0.9.6 → lbkit-0.9.7}/lbkit/tasks/config.py +0 -0
  38. {lbkit-0.9.6 → lbkit-0.9.7}/lbkit/tasks/executor.py +0 -0
  39. {lbkit-0.9.6 → lbkit-0.9.7}/lbkit/tasks/image_maker/__init__.py +0 -0
  40. {lbkit-0.9.6 → lbkit-0.9.7}/lbkit/tasks/image_maker/make_image.py +0 -0
  41. {lbkit-0.9.6 → lbkit-0.9.7}/lbkit/tasks/image_maker/make_qemu_image.py +0 -0
  42. {lbkit-0.9.6 → lbkit-0.9.7}/lbkit/tasks/image_maker/make_rockchip_image.py +0 -0
  43. {lbkit-0.9.6 → lbkit-0.9.7}/lbkit/tasks/task.py +0 -0
  44. {lbkit-0.9.6 → lbkit-0.9.7}/lbkit/tasks/task_build_image.py +0 -0
  45. {lbkit-0.9.6 → lbkit-0.9.7}/lbkit/tasks/task_build_manifest.py +0 -0
  46. {lbkit-0.9.6 → lbkit-0.9.7}/lbkit/tasks/task_build_prepare.py +0 -0
  47. {lbkit-0.9.6 → lbkit-0.9.7}/lbkit/tasks/task_build_rootfs.py +0 -0
  48. {lbkit-0.9.6 → lbkit-0.9.7}/lbkit/tasks/task_download.py +0 -0
  49. {lbkit-0.9.6 → lbkit-0.9.7}/lbkit/tasks/template/conanfile.py.mako +0 -0
  50. {lbkit-0.9.6 → lbkit-0.9.7}/lbkit/tasks/template/rootfs.py.mako +0 -0
  51. {lbkit-0.9.6 → lbkit-0.9.7}/lbkit/tools.py +0 -0
  52. {lbkit-0.9.6 → lbkit-0.9.7}/lbkit/ukr/__init__.py +0 -0
  53. {lbkit-0.9.6 → lbkit-0.9.7}/lbkit/ukr/build.py +0 -0
  54. {lbkit-0.9.6 → lbkit-0.9.7}/lbkit/utils/__init__.py +0 -0
  55. {lbkit-0.9.6 → lbkit-0.9.7}/lbkit/utils/env_detector.py +0 -0
  56. {lbkit-0.9.6 → lbkit-0.9.7}/lbkit/utils/images/__init__.py +0 -0
  57. {lbkit-0.9.6 → lbkit-0.9.7}/lbkit/utils/images/emmc.py +0 -0
  58. {lbkit-0.9.6 → lbkit-0.9.7}/lbkit.egg-info/SOURCES.txt +0 -0
  59. {lbkit-0.9.6 → lbkit-0.9.7}/lbkit.egg-info/dependency_links.txt +0 -0
  60. {lbkit-0.9.6 → lbkit-0.9.7}/lbkit.egg-info/entry_points.txt +0 -0
  61. {lbkit-0.9.6 → lbkit-0.9.7}/lbkit.egg-info/requires.txt +0 -0
  62. {lbkit-0.9.6 → lbkit-0.9.7}/lbkit.egg-info/top_level.txt +0 -0
  63. {lbkit-0.9.6 → lbkit-0.9.7}/setup.cfg +0 -0
  64. {lbkit-0.9.6 → lbkit-0.9.7}/setup.py +0 -0
  65. {lbkit-0.9.6 → lbkit-0.9.7}/test/__init__.py +0 -0
  66. {lbkit-0.9.6 → lbkit-0.9.7}/test/test_codegen.py +0 -0
  67. {lbkit-0.9.6 → lbkit-0.9.7}/test/test_config.py +0 -0
  68. {lbkit-0.9.6 → lbkit-0.9.7}/test/test_helper.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: lbkit
3
- Version: 0.9.6
3
+ Version: 0.9.7
4
4
  Summary: Tools provided by litebmc.com
5
5
  Home-page: https://www.litebmc.com
6
6
  Author: xuhj@litebmc.com
@@ -0,0 +1,2 @@
1
+
2
+ __version__ = '0.9.7'
@@ -105,6 +105,7 @@ class CodeGen(object):
105
105
  Logger("codegen.log")
106
106
  self.args = args
107
107
  self.codegen_version = __version__
108
+ log.info(f"Codegen version: {self.codegen_version.str}")
108
109
  self.log_level = "NOTSET"
109
110
 
110
111
  def _gen(self, idf_file, directory=".", code_type="all"):
@@ -113,11 +114,13 @@ class CodeGen(object):
113
114
  code_types = ["server", "client", "public"]
114
115
  if code_type != "all":
115
116
  code_types = [code_type]
116
- log.info(f"Codegen version: {self.codegen_version.str}")
117
117
  for ct in code_types:
118
118
  os.makedirs(os.path.join(directory, ct), exist_ok=True)
119
119
  out_file = os.path.join(directory, ct, interface.name + ".xml")
120
120
  interface.render_dbus_xml("interface.introspect.xml.mako", out_file)
121
+ # 确保生成xml的日志只打印一次
122
+ if ct == "public" or code_type == ct:
123
+ log.info("The sha256sum of interface {} is {}".format(out_file, interface.introspect_xml_sha256))
121
124
  out_file = os.path.join(directory, ct, interface.alias + ".h")
122
125
  interface.render_c_source(ct + ".h.mako", out_file)
123
126
  out_file = os.path.join(directory, ct, interface.alias + ".c")
@@ -41,6 +41,7 @@ class IdfInterfaceBase(Renderer):
41
41
  self.name = None
42
42
  self.object_path = None
43
43
  self.codegen_version = None
44
+ self.introspect_xml_sha256 = None
44
45
 
45
46
  class IdfAnnotation():
46
47
  def __init__(self, name, value):
@@ -1325,7 +1326,11 @@ class IdfInterface(IdfInterfaceBase):
1325
1326
  hash = hashlib.sha256()
1326
1327
  hash.update(out.encode('utf-8'))
1327
1328
  self.introspect_xml_sha256 = hash.hexdigest()
1328
- log.info("The sha256sum of interface {} is {}".format(out_file, self.introspect_xml_sha256))
1329
+ # TODO: 2026-10-19 删除此兼容写法,仅保留带 sha256 后缀的输出
1330
+ with open(out_file, "w") as fd:
1331
+ fd.write(out)
1332
+ base, ext = os.path.splitext(out_file)
1333
+ out_file = f"{base}-{self.introspect_xml_sha256[:6]}{ext}"
1329
1334
  with open(out_file, "w") as fd:
1330
1335
  fd.write(out)
1331
1336
 
@@ -322,7 +322,7 @@ static void __constructor(150) ${class_name}_register(void)
322
322
  _${class_name}_interface.signals = (LBSignal *)${intf.alias}_signals();
323
323
  ${method_processer} = ${intf.alias}_methods();
324
324
 
325
- // 从公共库中复制属性信息
325
+ // 从公共库中复制属性信息。虽然生成了带sha值的xml文件,但注册接口时文件名不带sha,由lb_base在加载时自动兼容
326
326
  memcpy(&${properties}, ${intf.alias}_properties_const(), sizeof(${properties}));
327
327
  lb_interface_register(&_${class_name}_interface,
328
328
  "${intf.introspect_xml_sha256}",
@@ -432,7 +432,7 @@ static void __constructor(150) ${class_name}_register(void)
432
432
  _${class_name}_interface.methods = (LBMethod *)${class_name}_methods();
433
433
  _${class_name}_interface.signals = (LBSignal *)${class_name}_signals();
434
434
 
435
- // 从公共库中复制属性信息
435
+ // 从公共库中复制属性信息。虽然生成了带sha值的xml文件,但注册接口时文件名不带sha,由lb_base在加载时自动兼容
436
436
  memcpy(&${properties}, ${class_name}_properties_const(), sizeof(${properties}));
437
437
  lb_interface_register(&_${class_name}_interface,
438
438
  "${intf.introspect_xml_sha256}",
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: lbkit
3
- Version: 0.9.6
3
+ Version: 0.9.7
4
4
  Summary: Tools provided by litebmc.com
5
5
  Home-page: https://www.litebmc.com
6
6
  Author: xuhj@litebmc.com
@@ -1,2 +0,0 @@
1
-
2
- __version__ = '0.9.6'
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