#!/usr/bin/env python3 # SPDX-License-Identifier: MIT """Check that the S-DSP referee, spc_dump, is built where the scripts look for it. The referee is blargg's snes_spc 0.9.0 (LGPL-2.1) linked with our driver ``spc_dump.cpp``: the GPL tool snes-spc in emu-tools-gpl, at ``$EMU_TOOLS_GPL/tools/snes-spc/build/spc_dump`` (emu-tools docs/contract.md, section 5). That tool's own ``build.sh`` fetches the pinned archive (SHA-256 ``dbad8273...``) into emu-tools-gpl and builds it there. Since 2026-11-24 this repository neither fetches nor keeps snes_spc's source (Aubrey's rule: no MIT repository downloads or keeps closed-box source), and builds nothing; the name is kept for the commands in the documents. "$EMU_TOOLS_GPL/tools/snes-spc/build.sh" # once, in the GPL repository python -I scripts/dsp_build_referees.py # checks it and prints its build-info The built program is an LGPL-2.1 combined work (family charter rule 6): a closed-box measuring instrument, run as a separate program, never shipped. Values it gives are OBSERVED (snes_spc 0.9.0, archive SHA-256 in its ``build/build-info.json``, via snes-spc 0.1.0). Without it this script stops with exit status 3, naming ``EMU_TOOLS_GPL`` and the ``build.sh`` to run. """ from __future__ import annotations import sys from pathlib import Path ROOT = Path(__file__).resolve().parents[1] sys.path.insert(0, str(ROOT / "scripts")) # run with -I: the script directory is not on the path from dsp_run_referee import require_referee # noqa: E402 def main() -> int: referee = require_referee() # exit 3, naming EMU_TOOLS_GPL and build.sh info = referee.parent / "build-info.json" print(f"referee: {referee}") if info.exists(): print(info.read_text(encoding="utf-8").strip()) return 0 if __name__ == "__main__": sys.exit(main())