INNER CODE UNIT · Python
discover_recipes
ExplosionEngine/Explosion · ThirdParty/ConanRecipes/build_recipes.py:91
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()
]
def order_by_dependencies(recipes: list[Recipe]) -> list[Recipe]:
by_name = {r.name: r for r in recipes}
ordered: list[Recipe] = []
visited: set[str] = set()
visiting: set[str] = set()
def visit(recipe: Recipe):
if recipe.name in visited:
return
if recipe.name in visiting: