Lines Matching +full:python3 +full:- +full:pip
1 #!/usr/bin/env python3
5 # SPDX-License-Identifier: Apache-2.0
11 Include file is generated for Kconfig using --kconfig-out.
12 A <name>:<path> text file is generated for use with CMake using --cmake-out.
14 Using --twister-out <filename> an argument file for twister script will
57 cmake-ext:
61 kconfig-ext:
65 sysbuild-cmake:
68 sysbuild-kconfig:
71 sysbuild-cmake-ext:
75 sysbuild-kconfig-ext:
83 - type: str
113 - type: str
118 - type: str
123 - type: str
128 - type: map
143 license-path:
152 doc-url:
159 external-references:
163 - type: str
164 package-managers:
168 pip:
172 requirement-files:
176 - type: str
181 - type: map
218 with Path(module_yml).open('r', encoding='utf-8') as f:
229 meta['name-sanitized'] = re.sub('[^a-zA-Z0-9]', '_', meta['name'])
235 'name-sanitized': re.sub('[^a-zA-Z0-9]', '_', module_path.name),
246 cmake_extern = section.get('cmake-ext', False)
251 "${ZEPHYR_" + meta['name-sanitized'].upper() + "_CMAKE_DIR}"))
277 cmake_extern = section.get('sysbuild-cmake-ext', False)
282 "${SYSBUILD_" + meta['name-sanitized'].upper() + "_CMAKE_DIR}"))
284 cmake_setting = section.get('sysbuild-cmake', None)
369 name_sanitized = meta['name-sanitized']
390 kconfig_extern = section.get('kconfig-ext', False)
405 name_sanitized = meta['name-sanitized']
414 kconfig_extern = section.get('sysbuild-kconfig-ext', False)
418 kconfig_setting = section.get('sysbuild-kconfig', None)
429 name_sanitized = meta['name-sanitized']
445 out += '-T\n{}\n'.format(PurePath(os.path.abspath(dir))
451 out += '--board-root\n{}\n'.format(PurePath(os.path.abspath(dir))
459 rc = subprocess.Popen(['git', 'rev-parse', '--is-inside-work-tree'],
465 popen = subprocess.Popen(['git', 'rev-parse', 'HEAD'],
470 stdout = stdout.decode('utf-8')
475 rc = subprocess.Popen(['git', 'diff-index', '--quiet', 'HEAD',
476 '--'],
481 return revision + '-dirty', True
491 stdout = stdout.decode('utf-8')
502 popen = subprocess.Popen(['git', 'remote', 'get-url', remote],
507 stdout = stdout.decode('utf-8')
518 popen = subprocess.Popen(['git', '-P', 'tag', '--points-at', revision],
523 stdout = stdout.decode('utf-8')
563 # - zephyr: path and revision
564 # - modules: name, path, and revision
565 # - west-projects: path and revision
579 zephyr_project['revision'] += '-off'
611 manifest_project["revision"] += "-off"
625 …t("remote") or project.sha(MANIFEST_REV_BRANCH) != meta_project['revision'].removesuffix("-dirty"):
633 meta_project['revision'] += '-off'
650 # It allows to have the "-off" flag since `modules` variable` does not provide URL/remote
671 zephyr_revision += '-dirty'
673 zephyr_revision += '-extra'
675 zephyr_revision += '-off'
681 manifest_revision += '-dirty'
683 manifest_revision += '-extra'
685 manifest_revision += '-off'
809 parser.add_argument('--kconfig-out',
812 parser.add_argument('--twister-out',
815 parser.add_argument('--cmake-out',
818 parser.add_argument('--sysbuild-kconfig-out',
821 parser.add_argument('--sysbuild-cmake-out',
824 parser.add_argument('--meta-out',
829 parser.add_argument('--meta-state-propagate', action='store_true',
833 parser.add_argument('--settings-out',
836 parser.add_argument('-m', '--modules', nargs='+',
839 parser.add_argument('-x', '--extra-modules', nargs='+',
841 parser.add_argument('-z', '--zephyr-base',
866 with open(args.kconfig_out, 'w', encoding="utf-8") as fp:
870 with open(args.cmake_out, 'w', encoding="utf-8") as fp:
874 with open(args.sysbuild_kconfig_out, 'w', encoding="utf-8") as fp:
878 with open(args.sysbuild_cmake_out, 'w', encoding="utf-8") as fp:
882 with open(args.settings_out, 'w', encoding="utf-8") as fp:
884 # WARNING. THIS FILE IS AUTO-GENERATED. DO NOT MODIFY!
896 with open(args.twister_out, 'w', encoding="utf-8") as fp:
903 with open(args.meta_out, 'w', encoding="utf-8") as fp: