Obtain a set of named targets that we can build.
(yaml_path: pathlib.Path)
| 80 | |
| 81 | |
| 82 | def supported_targets(yaml_path: pathlib.Path): |
| 83 | """Obtain a set of named targets that we can build.""" |
| 84 | targets = set() |
| 85 | |
| 86 | for target, settings in get_targets(yaml_path).items(): |
| 87 | for host_platform in settings["host_platforms"]: |
| 88 | if sys.platform == "linux" and host_platform == "linux_x86_64": |
| 89 | targets.add(target) |
| 90 | elif sys.platform == "linux" and host_platform == "linux_aarch64": |
| 91 | targets.add(target) |
| 92 | elif sys.platform == "darwin" and host_platform.startswith("macos_"): |
| 93 | targets.add(target) |
| 94 | |
| 95 | return targets |
| 96 | |
| 97 | |
| 98 | def target_needs(yaml_path: pathlib.Path, target: str): |