MCPcopy Create free account
hub / github.com/comaps/comaps / setup_generator_tool

Method setup_generator_tool

tools/python/maps_generator/generator/env.py:522–538  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

520
521 @staticmethod
522 def setup_generator_tool() -> AnyStr:
523 logger.info("Check generator tool ...")
524 exceptions = []
525 for gen_tool in settings.POSSIBLE_GEN_TOOL_NAMES:
526 gen_tool_path = shutil.which(gen_tool)
527 if gen_tool_path is None:
528 logger.info(f"Looking for generator tool in {settings.BUILD_PATH} ...")
529 try:
530 gen_tool_path = find_executable(settings.BUILD_PATH, gen_tool)
531 except FileNotFoundError as e:
532 exceptions.append(e)
533 continue
534
535 logger.info(f"Generator tool found - {gen_tool_path}")
536 return gen_tool_path
537
538 raise Exception(exceptions)
539
540 @staticmethod
541 def setup_world_roads_builder_tool() -> AnyStr:

Callers 1

__init__Method · 0.95

Calls 2

find_executableFunction · 0.90
appendMethod · 0.45

Tested by

no test coverage detected