diff options
| author | Zack <zmasi21@gmail.com> | 2026-11-28 13:59:35 -0800 |
|---|---|---|
| committer | Zack <zmasi21@gmail.com> | 2026-11-28 13:59:35 -0800 |
| commit | 06e5327291abf9ab43e85c6e08ab2bb4f3a7ac2d (patch) | |
| tree | ee03ea999daa390dcf669fe3d83a701d9c354b07 /scripts/dev.py | |
| parent | f77b4d80d0483027a978511d1d77d58a9523e43a (diff) | |
| parent | c7753ed98a56677f10e34078b37eab0540e190ec (diff) | |
Merge origin/main into fix/rdna2spirv-f16-interp-computed-ij
Diffstat (limited to 'scripts/dev.py')
| -rw-r--r-- | scripts/dev.py | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/scripts/dev.py b/scripts/dev.py index 4170aac63..00bf1bb21 100644 --- a/scripts/dev.py +++ b/scripts/dev.py | |||
| @@ -90,15 +90,15 @@ def guest_scene(args: list[str]) -> int: | |||
| 90 | parser.add_argument("-h", "--help", action="store_true") | 90 | parser.add_argument("-h", "--help", action="store_true") |
| 91 | parser.add_argument("--out", metavar="PATH") | 91 | parser.add_argument("--out", metavar="PATH") |
| 92 | options, _ = parser.parse_known_args(args) | 92 | options, _ = parser.parse_known_args(args) |
| 93 | if not options.help and not options.out: | 93 | if not options.help and not (options.out and options.out.strip()): |
| 94 | parser.error("--out PATH is required to keep the scene results") | 94 | parser.error("--out PATH is required to keep the scene results") |
| 95 | 95 | ||
| 96 | return run_producer(GUEST_SCENE, args) | 96 | return run_producer(GUEST_SCENE, args) |
| 97 | 97 | ||
| 98 | 98 | ||
| 99 | def main() -> int: | 99 | def main(argv: list[str] | None = None) -> int: |
| 100 | # The producer owns its arguments and help. Forward before argparse handles them. | 100 | # The producer owns its arguments and help. Forward before argparse handles them. |
| 101 | argv = sys.argv[1:] | 101 | argv = sys.argv[1:] if argv is None else list(argv) |
| 102 | if argv[:1] == ["boot-trace"]: | 102 | if argv[:1] == ["boot-trace"]: |
| 103 | return run_producer(BOOT_TRACE, argv[1:]) | 103 | return run_producer(BOOT_TRACE, argv[1:]) |
| 104 | if argv[:1] == ["guest-scene"]: | 104 | if argv[:1] == ["guest-scene"]: |
| @@ -119,7 +119,10 @@ def main() -> int: | |||
| 119 | if args.json: | 119 | if args.json: |
| 120 | print(json.dumps(result, indent=2)) | 120 | print(json.dumps(result, indent=2)) |
| 121 | else: | 121 | else: |
| 122 | sys.stdout.reconfigure(encoding="utf-8") | 122 | try: |
| 123 | sys.stdout.reconfigure(encoding="utf-8") | ||
| 124 | except (AttributeError, ValueError, OSError): | ||
| 125 | pass | ||
| 123 | print("Paths and help commands are relative to the Leonida checkout root.") | 126 | print("Paths and help commands are relative to the Leonida checkout root.") |
| 124 | for tool in result["tools"]: | 127 | for tool in result["tools"]: |
| 125 | status = "present" if tool["present"] else "missing" | 128 | status = "present" if tool["present"] else "missing" |