Lines Matching refs:os

18 import os
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,
261 toolchain_path = os.path.join(args.get("out_path"), i, subsystem_name,
269 if os.path.isfile(so_path):
270 lib_out_dir = os.path.join(args.get("out_path"), "component_package",
272 if not os.path.exists(lib_out_dir):
273 os.makedirs(lib_out_dir)
283 for filename in os.listdir(directory):
284 filepath = os.path.join(directory, filename)
285 if os.path.isfile(filepath):
299 bundlejson_out = os.path.join(args.get("out_path"), "component_package", args.get("part_path"))
301 if not os.path.exists(bundlejson_out):
302 os.makedirs(bundlejson_out)
303 bundlejson = os.path.join(args.get("root_path"), args.get("part_path"), "bundle.json")
310 if os.path.isfile(bundlejson):
341 if os.path.isfile(os.path.join(bundlejson_out, "bundle.json")):
342 os.remove(os.path.join(bundlejson_out, "bundle.json"))
343 …with os.fdopen(os.open(os.path.join(bundlejson_out, "bundle.json"), os.O_WRONLY | os.O_CREAT, mode…
350 license_out = os.path.join(args.get("out_path"), "component_package", args.get("part_path"))
352 if not os.path.exists(license_out):
353 os.makedirs(license_out)
354 license_file = os.path.join(args.get("root_path"), args.get("part_path"), "LICENSE")
355 if os.path.isfile(license_file):
358 license_default = os.path.join(args.get("root_path"), "build", "LICENSE")
360 …bundlejson_out = os.path.join(args.get("out_path"), "component_package", args.get("part_path"), 'b…
364 if os.path.isfile(bundlejson_out):
365 os.remove(bundlejson_out)
366 with os.fdopen(os.open(bundlejson_out, os.O_WRONLY | os.O_CREAT, mode=0o640), "w",
372 readme_out = os.path.join(args.get("out_path"), "component_package", args.get("part_path"))
374 if not os.path.exists(readme_out):
375 os.makedirs(readme_out)
376 readme = os.path.join(args.get("root_path"), args.get("part_path"), "README.md")
377 readme_zh = os.path.join(args.get("root_path"), args.get("part_path"), "README_zh.md")
378 readme_en = os.path.join(args.get("root_path"), args.get("part_path"), "README_en.md")
379 readme_out_file = os.path.join(readme_out, "README.md")
380 if os.path.isfile(readme):
382 elif os.path.isfile(readme_zh):
384 elif os.path.isfile(readme_en):
388 … with os.fdopen(os.open(readme_out_file, os.O_WRONLY | os.O_CREAT, mode=0o640), 'w') as fp:
483 gn_path = os.path.join(args.get("out_path"), "component_package", args.get("part_path"),
485 fd = os.open(gn_path, os.O_WRONLY | os.O_CREAT, mode=0o640)
486 fp = os.fdopen(fd, 'w')
500 if os.path.isfile(gn_path) and file_name:
505 fd = os.open(toolchain_gn_file, os.O_WRONLY | os.O_CREAT, mode=0o640)
506 fp = os.fdopen(fd, 'w')
514 file_list = os.scandir(lib_out_dir)
524 gn_path = os.path.join(args.get("out_path"), "component_package", args.get("part_path"),
527 lib_out_dir = os.path.join(args.get("out_path"), "component_package",
532 toolchain_gn_file = os.path.join(args.get("out_path"), "component_package",
534 if not os.path.exists(toolchain_gn_file):
535 os.mknod(toolchain_gn_file)
541 publicinfo_path = os.path.join(args.get("out_path"),
544 if os.path.exists(publicinfo_path) is False:
546 publicinfo_dir = os.listdir(publicinfo_path)
558 mksh_file_path = os.path.join(args.get('out_path'), 'startup', 'init', 'sh')
559 sh_out = os.path.join(args.get("out_path"), "thirdparty", "mksh")
560 if os.path.isfile(mksh_file_path):
563 … blkid_file_path = os.path.join(args.get('out_path'), 'filemanagement', 'storage_service', 'blkid')
564 blkid_out = os.path.join(args.get("out_path"), "thirdparty", "e2fsprogs")
565 if os.path.isfile(blkid_file_path):
568 …blkid_file_path = os.path.join(args.get('out_path'), 'clang_x64', 'thirdparty', 'grpc', 'grpc_cpp_…
569 blkid_out = os.path.join(args.get("out_path"), "thirdparty", "grpc")
570 if os.path.isfile(blkid_file_path):
631 json_path = os.path.join(root_path + "/build/indep_configs/variants/common/toolchain.json")
632 with os.fdopen(os.open(json_path, os.O_RDWR | os.O_CREAT, stat.S_IWUSR | stat.S_IRUSR),
649 part_path = os.path.join(args.get("out_path"), "component_package", args.get("part_path"))
662 part_path = os.path.join(args.get("out_path"), "component_package", args.get("part_path"))
663 dirs = os.listdir(part_path)
668 tgz_file_out = os.path.join(part_path, tgz_file_name)
674 _out_path = os.path.join(root_path, 'out')
675 hpm_packages_path = os.path.join(_out_path, 'hpm_packages')
676 os.makedirs(hpm_packages_path, exist_ok=True)
681 _component_package_path = os.path.join(out_path, 'component_package')
682 if os.path.isdir(_component_package_path):