From 073b47a236fd380c81c70e321bc41a6632c437b6 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sat, 18 Mar 2023 15:21:24 +0530 Subject: [PATCH] Revert #6114 Frozen kitty builds dont have python files (they are loaded from a single mmmaped archive), so the test will prevent any kittens from being found. Have make clean remove leftover kittens directories --- kittens/runner.py | 2 +- setup.py | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/kittens/runner.py b/kittens/runner.py index ddad68d1d..3cee69fbd 100644 --- a/kittens/runner.py +++ b/kittens/runner.py @@ -133,7 +133,7 @@ def run_kitten(kitten: str, run_name: str = '__main__') -> None: def all_kitten_names() -> FrozenSet[str]: ans = [] for name in list_kitty_resources('kittens'): - if '__' not in name and '.' not in name and 'main.py' in list_kitty_resources(f'kittens.{name}'): + if '__' not in name and '.' not in name and name != 'tui': ans.append(name) return frozenset(ans) diff --git a/setup.py b/setup.py index 415ddeeea..348a7de7a 100755 --- a/setup.py +++ b/setup.py @@ -1516,6 +1516,9 @@ def clean() -> None: os.unlink(os.path.join(root, f)) for x in glob.glob('glfw/wayland-*-protocol.[ch]'): os.unlink(x) + for x in glob.glob('kittens/*'): + if os.path.isdir(x) and not os.path.exists(os.path.join(x, '__init__.py')): + shutil.rmtree(x) subprocess.check_call(['go', 'clean', '-cache', '-testcache', '-modcache', '-fuzzcache'])