Lines Matching refs:os

18 import os
42 parser.add_argument("-os", "--os_arg", default=r"linux", type=str,
94 json_path = os.path.join(out_path + "/build_configs/parts_info/components.json")
95 with os.fdopen(os.open(json_path, os.O_RDWR | os.O_CREAT, stat.S_IWUSR | stat.S_IRUSR),
121 json_path = os.path.join(args.get("out_path"),
123 with os.fdopen(os.open(json_path, os.O_RDWR | os.O_CREAT, stat.S_IWUSR | stat.S_IRUSR),
152 real_static_lib_path = os.path.join(args.get("out_path"), "obj",
158 if not os.path.isdir(src_path):
160 filelist_src = os.listdir(src_path)
163 path = os.path.join(os.path.abspath(src_path), file)
164 if os.path.isdir(path):
167 path1 = os.path.join(target_path, file)
170 if not (os.path.splitext(path)[-1] in suffix_list):
174 if not os.path.exists(target_path):
175 os.makedirs(target_path)
176 path1 = os.path.join(target_path, file)
177 with os.fdopen(os.open(path1, os.O_WRONLY | os.O_CREAT, mode=0o640), "wb") as write_stream:
189 includes_out_dir = os.path.join(args.get("out_path"), "component_package",
192 toolchain_includes_out_dir = os.path.join(args.get("out_path"), "component_package",
194 toolchain_lib_out_dir = os.path.join(args.get("out_path"), "component_package",
196 if not os.path.exists(toolchain_includes_out_dir) and os.path.exists(toolchain_lib_out_dir):
197 os.makedirs(toolchain_includes_out_dir)
204 real_include_path = os.path.join(args.get("root_path"), split_include)
206 _out_dir = os.path.join(toolchain_includes_out_dir, _sub_include)
210 if not os.path.exists(includes_out_dir):
211 os.makedirs(includes_out_dir)
216 real_include_path = os.path.join(args.get("root_path"), split_include)
218 _out_dir = os.path.join(includes_out_dir, _sub_include)
227 if not os.path.exists(lib_out_dir):
228 os.makedirs(lib_out_dir)
229 file = os.path.join(root, file_name)
234 for root, dirs, files in os.walk(toolchain_path):
236 lib_out_dir = os.path.join(args.get("out_path"), "component_package",
244 toolchain_path = os.path.join(args.get("out_path"), i, 'obj', subsystem_name,
256 so_path = os.path.join(args.get("out_path"), subsystem_name,
259 so_path = os.path.join(args.get("out_path"), subsystem_name,
264 toolchain_path = os.path.join(args.get("out_path"), i, subsystem_name,
272 if os.path.isfile(so_path):
273 lib_out_dir = os.path.join(args.get("out_path"), "component_package",
275 if not os.path.exists(lib_out_dir):
276 os.makedirs(lib_out_dir)
286 for filename in os.listdir(directory):
287 filepath = os.path.join(directory, filename)
288 if os.path.isfile(filepath):
302 bundlejson_out = os.path.join(args.get("out_path"), "component_package", args.get("part_path"))
304 if not os.path.exists(bundlejson_out):
305 os.makedirs(bundlejson_out)
306 bundlejson = os.path.join(args.get("root_path"), args.get("part_path"), "bundle.json")
313 if os.path.isfile(bundlejson):
317 bundle_data.update({'os': args.get('os')})
344 if os.path.isfile(os.path.join(bundlejson_out, "bundle.json")):
345 os.remove(os.path.join(bundlejson_out, "bundle.json"))
346 with os.fdopen(os.open(os.path.join(bundlejson_out, "bundle.json"), os.O_WRONLY | os.O_CREAT, mode=0o640),
353 license_out = os.path.join(args.get("out_path"), "component_package", args.get("part_path"))
355 if not os.path.exists(license_out):
356 os.makedirs(license_out)
357 license_file = os.path.join(args.get("root_path"), args.get("part_path"), "LICENSE")
358 if os.path.isfile(license_file):
361 license_default = os.path.join(args.get("root_path"), "build", "LICENSE")
363 bundlejson_out = os.path.join(args.get("out_path"), "component_package", args.get("part_path"), 'bundle.json')
367 if os.path.isfile(bundlejson_out):
368 os.remove(bundlejson_out)
369 with os.fdopen(os.open(bundlejson_out, os.O_WRONLY | os.O_CREAT, mode=0o640), "w",
375 readme_out = os.path.join(args.get("out_path"), "component_package", args.get("part_path"))
377 if not os.path.exists(readme_out):
378 os.makedirs(readme_out)
379 readme = os.path.join(args.get("root_path"), args.get("part_path"), "README.md")
380 readme_zh = os.path.join(args.get("root_path"), args.get("part_path"), "README_zh.md")
381 readme_en = os.path.join(args.get("root_path"), args.get("part_path"), "README_en.md")
382 readme_out_file = os.path.join(readme_out, "README.md")
383 if os.path.isfile(readme):
385 elif os.path.isfile(readme_zh):
387 elif os.path.isfile(readme_en):
391 with os.fdopen(os.open(readme_out_file, os.O_WRONLY | os.O_CREAT, mode=0o640), 'w') as fp:
488 gn_path = os.path.join(args.get("out_path"), "component_package", args.get("part_path"),
490 fd = os.open(gn_path, os.O_WRONLY | os.O_CREAT, mode=0o640)
491 fp = os.fdopen(fd, 'w')
505 if os.path.isfile(gn_path) and file_name:
510 fd = os.open(toolchain_gn_file, os.O_WRONLY | os.O_CREAT, mode=0o640)
511 fp = os.fdopen(fd, 'w')
519 file_list = os.scandir(lib_out_dir)
529 gn_path = os.path.join(args.get("out_path"), "component_package", args.get("part_path"),
532 lib_out_dir = os.path.join(args.get("out_path"), "component_package",
537 toolchain_gn_file = os.path.join(args.get("out_path"), "component_package",
539 if not os.path.exists(toolchain_gn_file):
540 os.mknod(toolchain_gn_file)
546 publicinfo_path = os.path.join(args.get("out_path"),
549 if os.path.exists(publicinfo_path) is False:
551 publicinfo_dir = os.listdir(publicinfo_path)
563 mksh_file_path = os.path.join(args.get('out_path'), 'startup', 'init', 'sh')
564 sh_out = os.path.join(args.get("out_path"), "thirdparty", "mksh")
565 if os.path.isfile(mksh_file_path):
568 blkid_file_path = os.path.join(args.get('out_path'), 'filemanagement', 'storage_service', 'blkid')
569 blkid_out = os.path.join(args.get("out_path"), "thirdparty", "e2fsprogs")
570 if os.path.isfile(blkid_file_path):
573 blkid_file_path = os.path.join(args.get('out_path'), 'clang_x64', 'thirdparty', 'grpc', 'grpc_cpp_plugin')
574 blkid_out = os.path.join(args.get("out_path"), "thirdparty", "grpc")
575 if os.path.isfile(blkid_file_path):
636 json_path = os.path.join(root_path + "/build/indep_configs/variants/common/toolchain.json")
637 with os.fdopen(os.open(json_path, os.O_RDWR | os.O_CREAT, stat.S_IWUSR | stat.S_IRUSR),
654 part_path = os.path.join(args.get("out_path"), "component_package", args.get("part_path"))
667 part_path = os.path.join(args.get("out_path"), "component_package", args.get("part_path"))
668 dirs = os.listdir(part_path)
673 tgz_file_out = os.path.join(part_path, tgz_file_name)
679 _out_path = os.path.join(root_path, 'out')
680 hpm_packages_path = os.path.join(_out_path, 'hpm_packages')
681 os.makedirs(hpm_packages_path, exist_ok=True)
686 _component_package_path = os.path.join(out_path, 'component_package')
687 if os.path.isdir(_component_package_path):
774 "os": os_arg, "buildArch": build_arch_arg, "hpm_packages_path": hpm_packages_path,