INNER CODE UNIT · Python

list_versions

ExplosionEngine/Explosion · ThirdParty/ConanRecipes/build_recipes.py:81

def list_versions(data: dict) -> list[str]:
    sources = data.get("sources")
    if isinstance(sources, dict) and sources:
        return [str(v) for v in sources]
    versions = data.get("versions")
    if isinstance(versions, list) and versions:
        return [str(v) for v in versions]
    return []


def discover_recipes(root: Path) -> list[Recipe]:
    return [
        Recipe(child)
        for child in sorted(p for p in root.iterdir() if p.is_dir())
        if (child / "conanfile.py").is_file() and (child / "conandata.yml").is_file()
    ]

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…