openubmc-bingo 0.6.5__py3-none-any.whl → 0.6.9__py3-none-any.whl

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.

Potentially problematic release.


This version of openubmc-bingo might be problematic. Click here for more details.

bmcgo/__init__.py CHANGED
@@ -9,4 +9,4 @@
9
9
  # MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
10
10
  # See the Mulan PSL v2 for more details.
11
11
 
12
- __version__ = '0.6.5'
12
+ __version__ = '0.6.9'
bmcgo/cli/cli.py CHANGED
@@ -335,10 +335,11 @@ class Command(object):
335
335
  for line in lines:
336
336
  if not line.startswith("required_conan_version"):
337
337
  continue
338
- match = re.search("([0-9]+\\.[0-9]+\\.[0-9]+)", line)
338
+ match = re.search("\"(.*)\"", line)
339
339
  if not match:
340
340
  continue
341
- if match[0].startswith("2."):
341
+ import semver
342
+ if semver.satisfies("2.13.0", match[1]):
342
343
  need_conan_v2 = True
343
344
  break
344
345
  else:
bmcgo/component/build.py CHANGED
@@ -57,10 +57,6 @@ class BuildComp():
57
57
 
58
58
  @staticmethod
59
59
  def check_luac():
60
- luac_path = os.path.join(os.path.expanduser('~'), ".conan", "bin", "luac")
61
- if not os.path.isfile(luac_path):
62
- raise BmcGoException(f"当前环境中未安装luac!请更新manifest仓代码,执行环境初始化脚本init.py重新部署环境!")
63
-
64
60
  conan_bin = os.path.join(os.path.expanduser('~'), ".conan", "bin")
65
61
  # 设置PLD_LIBRARY_PATH环境变量,luajit运行时需要加载so动态库
66
62
  ld_library_path = conan_bin + ":" + os.environ.get("LD_LIBRARY_PATH", "")
@@ -69,6 +65,43 @@ class BuildComp():
69
65
  path = conan_bin + ":" + os.environ.get("PATH", "")
70
66
  os.environ["PATH"] = path
71
67
  os.environ["LUA_PATH"] = f"{conan_bin}/?.lua"
68
+
69
+ def install_luac(self):
70
+ self.check_luac()
71
+ if self.bconfig.partner_mode:
72
+ return
73
+ conan_bin = os.path.join(os.path.expanduser('~'), ".conan", "bin")
74
+ luac_path = os.path.join(conan_bin, "luac")
75
+ skynet_pkg = "skynet/1.7.0.B002@hw.ibmc.release/stable"
76
+ skynet_flag = skynet_pkg.split("@")[0].replace("/", "_")
77
+ skynet_flag = os.path.join(conan_bin, skynet_flag)
78
+
79
+ options = ""
80
+ if self.info.enable_luajit:
81
+ luac_path = os.path.join(conan_bin, "luajit")
82
+ options = "-0 skynet:enable_luajit=True"
83
+ skynet_flag += "_luajit"
84
+ else:
85
+ skynet_flag += "luac"
86
+ if os.path.isfile(skynet_flag) and os.path.exists(luac_path):
87
+ os.chmod(luac_path, stat.S_IRWXU)
88
+ return
89
+ if os.path.isdir(conan_bin):
90
+ shutil.rmtree(conan_bin)
91
+ os.makedirs(conan_bin)
92
+ cmd = [misc.CONAN, "install", skynet_pkg, "-pr", "profile.dt.ini", "--build", "-u"]
93
+ cmd += options.split()
94
+ if self.info.remote:
95
+ cmd += ["-r", self.info.remote]
96
+ Helper.run(cmd)
97
+ os.chmod(luac_path, stat.S_IRWXU)
98
+ if self.info.enable_luajit:
99
+ luajit2luac = shutil.which("luajit2luac.sh")
100
+ cmd = ["cp", luajit2luac, f"{conan_bin}/luac"]
101
+ Helper.run(cmd)
102
+ import pathlib
103
+ pathlib.Path(skynet_flag).touch(exist_ok=True)
104
+
72
105
 
73
106
  def gen_conanbase(self, gen_conanbase, service_json):
74
107
  if misc.conan_v1():
@@ -208,7 +241,7 @@ class BuildComp():
208
241
  def run_conan_v1(self):
209
242
  tool.clean_locks()
210
243
  self.check_conan_profile()
211
- self.check_luac()
244
+ self.install_luac()
212
245
  from_source = "--build=missing"
213
246
  if self.info.from_source:
214
247
  from_source = "--build"
@@ -238,7 +271,7 @@ class BuildComp():
238
271
  if self.info.no_cache:
239
272
  args += " -u"
240
273
  cmd = [misc.CONAN, "create", "--name", self.info.name, "--version", self.info.version]
241
- args += f" -f json --out-file={self.graph_file.name}"
274
+ args += f" -f json --out-file={self.graph_file.name} -tf="
242
275
  cmd += args.split()
243
276
  tool.run_command(cmd, show_log=True)
244
277
  package_folder = tool.get_package_folder_from_graph_file(self.graph_file.name, self.info.package)
@@ -256,6 +289,7 @@ class BuildComp():
256
289
  if os.path.isdir("test_package"):
257
290
  cmd = [misc.CONAN, "create"]
258
291
  cmd += self.info.cmd_base.split()
292
+ cmd += ["--build=missing"]
259
293
  cmd += ["-tf", "test_package"]
260
294
  Helper.run(cmd)
261
295
 
bmcgo/component/test.py CHANGED
@@ -412,7 +412,7 @@ class TestComp():
412
412
  if return_code == 0:
413
413
  log.info(f"添加luacov 依赖到 {self.preloader}")
414
414
  insert_str = "require 'luacov'"
415
- self.tools.run_command(f"sed -i \"1i {insert_str}\" {self.test_config}")
415
+ self.tools.run_command(f"sed -i \"1i {insert_str}\" {self.preloader}")
416
416
  return
417
417
 
418
418
  preloader_dir = os.path.dirname(self.preloader)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: openubmc-bingo
3
- Version: 0.6.5
3
+ Version: 0.6.9
4
4
  Summary: Tools provided by openubmc
5
5
  Home-page: https://openubmc.cn
6
6
  Classifier: Programming Language :: Python :: 3
@@ -1,4 +1,4 @@
1
- bmcgo/__init__.py,sha256=HkfuO_PI6boJ1j3oBGA-nQzCHEsgrvMlV-5XC_wnMGg,561
1
+ bmcgo/__init__.py,sha256=H1vNju-JkVTTHzbQe3YxQWPLnjMc71rbXm0aiozfv0M,561
2
2
  bmcgo/bmcgo.py,sha256=uD4TsfjrFB5aQPIS6WRUVc9ShXX-dSImY9ezkB13g1w,685
3
3
  bmcgo/bmcgo_config.py,sha256=-HZcTsnccE5wUsgGJ59kq8sDdu8feftIbpyoFvyvBhU,11264
4
4
  bmcgo/errors.py,sha256=QW1ndrJcJ2Ws7riOznPKVvZsNlrYk73eZol7w8gJTPU,3076
@@ -7,7 +7,7 @@ bmcgo/logger.py,sha256=rcMqJnyQ5Ag3k04KLEskrG8ZJ508OOU_JH4fMFiGOqQ,6644
7
7
  bmcgo/misc.py,sha256=w0vzsD7uzrsxTly5Y1viLgYTKHhLP4sxa499XwbqHnU,6986
8
8
  bmcgo/worker.py,sha256=OXz5Gam3pmZjgQeoGJrYy73ZrQszCOxk9X19nbeBI_A,15710
9
9
  bmcgo/cli/__init__.py,sha256=BDXz8BcSlCkfo5UYt6j2rm89-HiYA1ZzfpFhy99MH-0,538
10
- bmcgo/cli/cli.py,sha256=92xIehLCq8g0WOb5myU7Tr8uSeq1NbwOAngdyz_tuVc,25560
10
+ bmcgo/cli/cli.py,sha256=kuNrwKpg5Zbi9TG0jhlObkAJ3xJtj35sBIh-q2bmlyU,25583
11
11
  bmcgo/cli/config.conan2.yaml,sha256=SAtM_6_qOjZbkgUT5fzWbhbq4aWCayqE8o4xJ2vBRww,261
12
12
  bmcgo/cli/config.yaml,sha256=tbnFhz2TTrl2-ALpHHujbXB1ymZpjGC4f0zTfqfUZfM,194
13
13
  bmcgo/codegen/__init__.py,sha256=eplRBfR_obzVWMQtIeX1RRq6DOEezBx_l1EqcZYLRPM,775
@@ -168,13 +168,13 @@ bmcgo/codegen/lua/v1/templates/apps/service.lua.mako,sha256=wd_NJtiSSMbR-lxEqv-r
168
168
  bmcgo/codegen/lua/v1/templates/apps/utils/mdb_intf.lua.mako,sha256=msdj2SygZvV3RIEHLeVDfZvOzZ99Yy27SwPVrFVVcpc,1242
169
169
  bmcgo/codegen/lua/v1/templates/apps/utils/mdb_obj.lua.mako,sha256=oCzx2u3bjvCdNKX5oC8j6Q-Zb21q6SFCqd14_VzrWvo,349
170
170
  bmcgo/component/__init__.py,sha256=BDXz8BcSlCkfo5UYt6j2rm89-HiYA1ZzfpFhy99MH-0,538
171
- bmcgo/component/build.py,sha256=gomdHTfscI4p_m2sev2vR9ws55N7ZyuMPNPGv126u9U,11630
171
+ bmcgo/component/build.py,sha256=7ZYTxVOVO6T1caP3KCmyJ8yWE992g8gc6yU2f-bZx5s,12851
172
172
  bmcgo/component/component_dt_version_parse.py,sha256=-Rt6i2fZrmYNZGoMqB21D_T9fC7fhhtUFIFvdPsMICM,14188
173
173
  bmcgo/component/component_helper.py,sha256=rNwfhagfz6E3BjKERq9oOPLRfeKQlqhLojb6oJLXcEA,7933
174
174
  bmcgo/component/deploy.py,sha256=Iy5CsiolKS1h5jDg13nYkfy6--BtbBZ8FLou2oVuoLQ,6544
175
175
  bmcgo/component/gen.py,sha256=lhPe_VV08CDFSydSLCX7IC5m8obNvYZSSzIp9o84nd0,7248
176
176
  bmcgo/component/package_info.py,sha256=5iOcS9gFnwBQo3uNivVjgeJw_xP3RDnnBA7nxjOc2vs,14472
177
- bmcgo/component/test.py,sha256=t_j0K_r5OrZ4T_2io8Kk53xYf0M6bD5yextANttaRKU,45373
177
+ bmcgo/component/test.py,sha256=kNfqBSiBoZDQoyFjymIEJt9ohXi3_2rELsvyxCzpLNk,45371
178
178
  bmcgo/component/analysis/analysis.py,sha256=VJpKdvQmlFQaeKWl3-JggsPq4ioObKOXuaBfzgd74hQ,8497
179
179
  bmcgo/component/analysis/build_deps.py,sha256=cyQh5D3R1syQfMJcNxEIKKSJGanPMNRFPGlJRitDAa0,7324
180
180
  bmcgo/component/analysis/data_deps.py,sha256=UkuqMhJseZIXMZWC2cJ4csko7rENPlpXJUU0eRWVZNM,16148
@@ -264,8 +264,8 @@ bmcgo/utils/installations/install_plans/qemu.yml,sha256=lT7aKag60QUH6hTGFKa3hGRq
264
264
  bmcgo/utils/installations/install_plans/studio.yml,sha256=APR3GM-3Q11LFfe8vh7t3LztDn4LLEpNHRUNjkaVekA,143
265
265
  bmcgo/utils/installations/installers/apt_installer.py,sha256=nPaCb4cobSi9InN_aHsEPtQ0k4FgsCUWE5_VgBPvcRE,3769
266
266
  bmcgo/utils/installations/installers/pip_installer.py,sha256=dDdios1EQ7fzt90r02pZeoM3jCmjslLzkSvzd2hgRVM,3241
267
- openubmc_bingo-0.6.5.dist-info/METADATA,sha256=QqHsIpyNgwy7-mIC-MFArF_7S1ccv37wcHuhO7jbyng,1009
268
- openubmc_bingo-0.6.5.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
269
- openubmc_bingo-0.6.5.dist-info/entry_points.txt,sha256=UUoUP-vAWTgg9vEYbRwYqOBHgpRtkngdzMPb-ocz90g,42
270
- openubmc_bingo-0.6.5.dist-info/top_level.txt,sha256=9AcvCAt1nZcOgMsGt6T07mg2Bgtdet-3mHTwg91axgI,6
271
- openubmc_bingo-0.6.5.dist-info/RECORD,,
267
+ openubmc_bingo-0.6.9.dist-info/METADATA,sha256=dR-Pnq-u-cJmQ3sYwM3AI0-v7cLHM2Z6qZxDk9oIY-o,1009
268
+ openubmc_bingo-0.6.9.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
269
+ openubmc_bingo-0.6.9.dist-info/entry_points.txt,sha256=UUoUP-vAWTgg9vEYbRwYqOBHgpRtkngdzMPb-ocz90g,42
270
+ openubmc_bingo-0.6.9.dist-info/top_level.txt,sha256=9AcvCAt1nZcOgMsGt6T07mg2Bgtdet-3mHTwg91axgI,6
271
+ openubmc_bingo-0.6.9.dist-info/RECORD,,