refactor: move es_systems readers out of batocera

es_systems.yml readers move to scraper/es_systems.py, which the board
target scraper imports at load time instead of inside a function to dodge
the cycle. The _default.remove_cores list is target override data: it is
model.targets.not_cores, no longer a private name of batocera_scraper.
This commit is contained in:
Abdessamad Derraz committed 2026-11-21 16:43:46 +01:00
1 parent 14cc76132f
commit e6295aba88
12 files changed
+174 -167

No files matched your search

+11 -1
View File
@@ -7,7 +7,7 @@ import re
import sys
from pathlib import Path
from core.paths import PLATFORMS_DIR
from core.paths import PLATFORMS_DIR, REPO_ROOT
from core.cli import SourceUnreadable, suggest_names
from model.sources import source_yaml_file
@@ -31,6 +31,16 @@ def target_overrides(platform: str, targets_dir: str | os.PathLike[str]) -> dict
return platform_overrides(read_target_overrides(targets_dir), platform)
def not_cores(
platform: str, targets_dir: str | os.PathLike[str] = REPO_ROOT / PLATFORMS_DIR / "targets",
) -> set[str]:
"""Names a platform's system list files under an emulator that are not
emulators (machine selectors, video plugins, launchers): its
`_default.remove_cores` overrides."""
default = target_overrides(platform, targets_dir).get("_default") or {}
return {str(name) for name in default.get("remove_cores") or []}
def target_aliases(overrides: dict, target: str) -> list[str]:
"""The other names a target answers to: the pack builder and the
installer read this one list, or the installer refuses a word the pack