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

Function _make_streaming_env

ci/meson/streaming_runner.py:116–137  ·  view source on GitHub ↗

Build the environment dict for streamed test subprocesses. Adds the fastled shared lib directory + clang toolchain runtime DLLs to PATH (Windows) or LD_LIBRARY_PATH (POSIX) so DLLs load without MSYS2.

(source_dir: Path, build_dir: Path)

Source from the content-addressed store, hash-verified

114
115
116def _make_streaming_env(source_dir: Path, build_dir: Path) -> dict[str, str]:
117 """Build the environment dict for streamed test subprocesses.
118
119 Adds the fastled shared lib directory + clang toolchain runtime DLLs to
120 PATH (Windows) or LD_LIBRARY_PATH (POSIX) so DLLs load without MSYS2.
121 """
122 streaming_env = os.environ.copy()
123 fastled_lib_dir = str(build_dir / "ci" / "meson" / "native")
124 if os.name == "nt":
125 from clang_tool_chain import get_runtime_dll_paths
126
127 extra_dirs = os.pathsep.join([fastled_lib_dir] + get_runtime_dll_paths())
128 streaming_env["PATH"] = extra_dirs + os.pathsep + streaming_env.get("PATH", "")
129 else:
130 streaming_env["LD_LIBRARY_PATH"] = (
131 fastled_lib_dir + os.pathsep + streaming_env.get("LD_LIBRARY_PATH", "")
132 )
133 # source_dir is intentionally unused — only the build_dir matters for
134 # DLL lookup, but the parameter is kept for symmetry with the rest of
135 # the streaming context.
136 _ = source_dir
137 return streaming_env
138
139
140def _check_all_with_examples_target(ctx: StreamingContext) -> None:

Callers 1

run_streaming_pathFunction · 0.85

Calls 2

copyMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected