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

Method __init__

ci/compiler/pio.py:312–354  ·  view source on GitHub ↗
(
        self,
        board: Board | str,
        verbose: bool,
        global_cache_dir: Path,
        additional_defines: Optional[list[str]] = None,
        additional_include_dirs: Optional[list[str]] = None,
        additional_libs: Optional[list[str]] = None,
        use_fbuild: bool = False,
    )

Source from the content-addressed store, hash-verified

310
311class PioCompiler(Compiler):
312 def __init__(
313 self,
314 board: Board | str,
315 verbose: bool,
316 global_cache_dir: Path,
317 additional_defines: Optional[list[str]] = None,
318 additional_include_dirs: Optional[list[str]] = None,
319 additional_libs: Optional[list[str]] = None,
320 use_fbuild: bool = False,
321 ) -> None:
322 # Call parent constructor
323 super().__init__()
324
325 # Convert string to Board object if needed
326 if isinstance(board, str):
327 self.board = create_board(board)
328 else:
329 self.board = board
330 self.verbose = verbose
331 self.additional_defines = additional_defines
332 self.additional_include_dirs = additional_include_dirs
333 self.additional_libs = additional_libs
334 self.use_fbuild = use_fbuild
335
336 # Global cache directory is already resolved by caller
337 self.global_cache_dir = global_cache_dir
338
339 # Use centralized path management
340 self.paths = FastLEDPaths(self.board.board_name)
341 self.platform_lock = PlatformLock(self.paths.platform_lock_file)
342
343 # Always override the cache directory with our resolved path
344 self.paths._global_platformio_cache_dir = self.global_cache_dir
345 self.build_dir: Path = self.paths.build_dir
346
347 # Ensure all directories exist
348 self.paths.ensure_directories_exist()
349
350 # Package installation lock is now handled by daemon (system-wide singleton)
351 # No per-board lock needed
352
353 self.initialized = False
354 self.executor = ThreadPoolExecutor(max_workers=1)
355
356 def _internal_init_build_no_lock(self, example: str) -> InitResult:
357 """Initialize the PlatformIO build directory once with the first example."""

Callers

nothing calls this directly

Calls 4

create_boardFunction · 0.90
FastLEDPathsClass · 0.90
PlatformLockClass · 0.90

Tested by

no test coverage detected