MCPcopy Create free account
hub / github.com/ResearAI/DeepScientist / resolve_tinytex_binary

Function resolve_tinytex_binary

src/deepscientist/tinytex.py:77–99  ·  view source on GitHub ↗
(binary: str, home: Path | None = None)

Source from the content-addressed store, hash-verified

75
76
77def resolve_tinytex_binary(binary: str, home: Path | None = None) -> dict[str, Any]:
78 normalized = str(binary or "").strip()
79 if not normalized:
80 return {"binary": None, "path": None, "source": None, "root": None, "bin_dir": None}
81 for root in tinytex_root_candidates(home):
82 for bin_dir in _tinytex_bin_dirs(root):
83 for name in _binary_names(normalized):
84 candidate = bin_dir / name
85 if candidate.exists():
86 return {
87 "binary": normalized,
88 "path": str(candidate),
89 "source": "tinytex",
90 "root": str(root),
91 "bin_dir": str(bin_dir),
92 }
93 return {
94 "binary": normalized,
95 "path": None,
96 "source": None,
97 "root": None,
98 "bin_dir": None,
99 }
100
101
102def resolve_latex_binary(binary: str, home: Path | None = None) -> dict[str, Any]:

Callers 3

resolve_latex_binaryFunction · 0.85
inspect_latex_runtimeFunction · 0.85
resolve_binaryMethod · 0.85

Calls 3

tinytex_root_candidatesFunction · 0.85
_tinytex_bin_dirsFunction · 0.85
_binary_namesFunction · 0.85

Tested by

no test coverage detected