MCPcopy
hub / github.com/astral-sh/python-build-standalone / supported_targets

Function supported_targets

pythonbuild/utils.py:82–95  ·  view source on GitHub ↗

Obtain a set of named targets that we can build.

(yaml_path: pathlib.Path)

Source from the content-addressed store, hash-verified

80
81
82def 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
98def target_needs(yaml_path: pathlib.Path, target: str):

Callers 1

mainFunction · 0.90

Calls 1

get_targetsFunction · 0.85

Tested by

no test coverage detected