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
This commit is contained in:
Kovid Goyal 2023-03-18 15:21:24 +05:30
parent bf773351ed
commit 073b47a236
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
2 changed files with 4 additions and 1 deletions

View File

@ -133,7 +133,7 @@ def run_kitten(kitten: str, run_name: str = '__main__') -> None:
def all_kitten_names() -> FrozenSet[str]: def all_kitten_names() -> FrozenSet[str]:
ans = [] ans = []
for name in list_kitty_resources('kittens'): 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) ans.append(name)
return frozenset(ans) return frozenset(ans)

View File

@ -1516,6 +1516,9 @@ def clean() -> None:
os.unlink(os.path.join(root, f)) os.unlink(os.path.join(root, f))
for x in glob.glob('glfw/wayland-*-protocol.[ch]'): for x in glob.glob('glfw/wayland-*-protocol.[ch]'):
os.unlink(x) 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']) subprocess.check_call(['go', 'clean', '-cache', '-testcache', '-modcache', '-fuzzcache'])