MCPcopy Create free account
hub / github.com/FastLED/FastLED / get_fbuild_executable

Function get_fbuild_executable

ci/util/fbuild_runner.py:82–97  ·  view source on GitHub ↗

Resolve the ``fbuild`` executable for the active Python environment. Prefer the sibling script next to the current interpreter so ``uv run`` reliably uses the version locked in this repo's virtualenv instead of an older global ``fbuild`` earlier on ``PATH``.

()

Source from the content-addressed store, hash-verified

80
81
82def get_fbuild_executable() -> str | None:
83 """Resolve the ``fbuild`` executable for the active Python environment.
84
85 Prefer the sibling script next to the current interpreter so ``uv run``
86 reliably uses the version locked in this repo's virtualenv instead of an
87 older global ``fbuild`` earlier on ``PATH``.
88 """
89 script_dir = Path(sys.executable).resolve().parent
90 candidates = [
91 script_dir / "fbuild",
92 script_dir / "fbuild.exe",
93 ]
94 for candidate in candidates:
95 if candidate.exists():
96 return str(candidate)
97 return shutil.which("fbuild")
98
99
100def fbuild_subprocess_env() -> dict[str, str]:

Callers 5

ensure_compile_commandsFunction · 0.90
run_fbuild_compileFunction · 0.85
run_fbuild_deployFunction · 0.85

Calls 1

resolveMethod · 0.45

Tested by

no test coverage detected