INNER CODE UNIT · Python
_parse_name
ExplosionEngine/Explosion · ThirdParty/ConanRecipes/build_recipes.py:68
def _parse_name(self) -> str | None:
text = self.conanfile.read_text(encoding="utf-8")
match = re.search(r"""^\s*name\s*=\s*["']([^"']+)["']""", text, re.MULTILINE)
return match.group(1) if match else None
def supports(self, host: str) -> bool:
return host in self.platforms
@property
def reference(self) -> str:
return f"{self.name}/{self.version}"
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")