Remove startswith('win') from autoninja and siso.

Windows can only be win32, and that holds to this day: https://docs.python.org/3.15/library/sys.html#sys.platform. Using this allows us to use better vscode integration of system checking and lines greyouts: https://screenshot.googleplex.com/8gkNyfPKMB9GPeU.

Change-Id: If9ab97bc30ab80df96b1aced0e78b0706a6a6964
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/7259617
Commit-Queue: Alex Ovsienko <ovsienko@google.com>
Reviewed-by: Junji Watanabe <jwata@google.com>
This commit is contained in:
Alex Ovsienko
2025-12-15 00:00:49 -08:00
committed by LUCI CQ
parent 883e6b91c0
commit a9534daf99
2 changed files with 8 additions and 8 deletions

View File

@@ -463,7 +463,7 @@ def main(args, telemetry_cfg: Optional[build_telemetry.Config] = None):
signal.signal(signal.SIGINT, _ignore)
if not sys.platform.startswith('win'):
if sys.platform != "win32":
signal.signal(signal.SIGTERM, lambda signum, frame: None)
# On Windows the siso.bat script passes along the arguments enclosed in
@@ -472,7 +472,7 @@ def main(args, telemetry_cfg: Optional[build_telemetry.Config] = None):
# detected, we need to split the argument. This means that arguments
# containing actual spaces are not supported by siso.bat, but that is not a
# real limitation.
if sys.platform.startswith('win') and len(args) == 2:
if sys.platform == "win32" and len(args) == 2:
args = args[:1] + args[1].split()
# macOS's python sets CPATH, LIBRARY_PATH, SDKROOT implicitly.