MCPcopy Create free account
hub / github.com/NVIDIA/OpenShell / main

Function main

scripts/generate_third_party_notices.py:246–272  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

244
245
246def main() -> int:
247 root = find_repo_root()
248 t0 = time.monotonic()
249
250 print("Generating third-party notices...")
251 print()
252
253 print("Collecting Rust dependencies...")
254 rust_groups = get_rust_notices()
255 rust_count = sum(len(g["crates"]) for g in rust_groups)
256 print(f" {rust_count} Rust packages across {len(rust_groups)} license groups")
257 print()
258
259 print("Collecting Python dependencies...")
260 python_packages = get_python_notices()
261 print(f" {len(python_packages)} Python packages")
262 print()
263
264 notices = format_notices(rust_groups, python_packages)
265 output = root / "THIRD-PARTY-NOTICES"
266 output.write_text(notices)
267
268 elapsed = time.monotonic() - t0
269 line_count = notices.count("\n") + 1
270 print(f"Wrote {output.name} ({line_count} lines, {len(notices)} bytes)")
271 print(f"Done in {elapsed:.1f}s")
272 return 0
273
274
275if __name__ == "__main__":

Callers 1

Calls 4

get_rust_noticesFunction · 0.85
get_python_noticesFunction · 0.85
format_noticesFunction · 0.85
find_repo_rootFunction · 0.70

Tested by

no test coverage detected