MCPcopy Index your code
hub / github.com/astral-sh/python-build-standalone / write_target_settings

Function write_target_settings

pythonbuild/utils.py:243–254  ·  view source on GitHub ↗
(targets, dest_path: pathlib.Path)

Source from the content-addressed store, hash-verified

241
242
243def write_target_settings(targets, dest_path: pathlib.Path):
244 dest_path.mkdir(parents=True, exist_ok=True)
245
246 for triple, settings in targets.items():
247 payload = {}
248
249 for key in ("host_cc", "host_cxx", "target_cc", "target_cflags"):
250 payload[key] = settings.get(key)
251
252 serialized_payload = json.dumps(payload, indent=4).encode("utf-8")
253
254 write_if_different(dest_path / triple, serialized_payload)
255
256
257class IntegrityError(Exception):

Callers 1

mainFunction · 0.90

Calls 1

write_if_differentFunction · 0.85

Tested by

no test coverage detected