From 10683c748c083fef8bf3df3b021efaf55c159ecb Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Tue, 22 Apr 2025 08:46:11 +0530 Subject: [PATCH] Use sorted boolean cli options to prevent spurious rebuilds --- setup.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index bd7a55584..257e3b55f 100755 --- a/setup.py +++ b/setup.py @@ -133,7 +133,10 @@ class CompilationDatabase: def cmd_changed(self, compile_cmd: Command) -> bool: key, cmd = compile_cmd.key, compile_cmd.cmd - return bool(self.db.get(key) != cmd) + dkey = self.db.get(key) + if dkey != cmd: + return True + return False def __enter__(self) -> 'CompilationDatabase': self.all_keys: Set[CompileKey] = set() @@ -1280,7 +1283,7 @@ def read_bool_options(path: str = 'kitty/cli.py') -> Tuple[str, ...]: @lru_cache(2) def kitty_cli_boolean_options() -> Tuple[str, ...]: - return tuple(set(read_bool_options()) | set(read_bool_options('kittens/panel/main.py'))) + return tuple(sorted(set(read_bool_options()) | set(read_bool_options('kittens/panel/main.py')))) def build_launcher(args: Options, launcher_dir: str = '.', bundle_type: str = 'source') -> None: