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

Function default_target_triple

pythonbuild/utils.py:56–68  ·  view source on GitHub ↗

Resolve the default target triple to build for.

()

Source from the content-addressed store, hash-verified

54
55
56def default_target_triple() -> str:
57 """Resolve the default target triple to build for."""
58 host = current_host_platform()
59 if host == "linux_x86_64":
60 return "x86_64-unknown-linux-gnu"
61 elif host == "linux_aarch64":
62 return "aarch64-unknown-linux-gnu"
63 elif host == "macos_arm64":
64 return "aarch64-apple-darwin"
65 elif host == "macos_x86_64":
66 return "x86_64-apple-darwin"
67 else:
68 raise Exception(f"unrecognized host platform: {host}")
69
70
71def get_targets(yaml_path: pathlib.Path):

Callers 1

mainFunction · 0.90

Calls 1

current_host_platformFunction · 0.85

Tested by

no test coverage detected