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

Function get_meson_executable

ci/meson/compiler.py:12–35  ·  view source on GitHub ↗

Resolve meson executable path, preferring venv installation. This ensures consistent meson version usage regardless of invocation method (direct Python vs uv run). The venv meson version is controlled by pyproject.toml. Returns: Path to meson executable (venv version prefe

()

Source from the content-addressed store, hash-verified

10
11
12def get_meson_executable() -> str:
13 """
14 Resolve meson executable path, preferring venv installation.
15
16 This ensures consistent meson version usage regardless of invocation method
17 (direct Python vs uv run). The venv meson version is controlled by pyproject.toml.
18
19 Returns:
20 Path to meson executable (venv version preferred, falls back to PATH)
21 """
22 # Try to find venv meson first
23 script_dir = Path(__file__).resolve().parent
24 project_root = script_dir.parent.parent
25
26 # Platform-specific meson executable name
27 is_windows = sys.platform.startswith("win") or os.name == "nt"
28 meson_exe_name = "meson.exe" if is_windows else "meson"
29 venv_meson = project_root / ".venv" / "Scripts" / meson_exe_name
30
31 if venv_meson.exists():
32 return str(venv_meson)
33
34 # Fallback to PATH resolution (will use system meson)
35 return "meson"
36
37
38def check_meson_installed() -> bool:

Callers 10

stream_compile_onlyFunction · 0.90
build_meson_setup_cmdFunction · 0.90
compile_mesonFunction · 0.90
run_meson_testFunction · 0.90
compile_examplesFunction · 0.90
run_examplesFunction · 0.90
check_meson_installedFunction · 0.70
get_meson_versionFunction · 0.70

Calls 1

resolveMethod · 0.45

Tested by 2

run_meson_testFunction · 0.72