How to use the lbuild.utils.listify function in lbuild

To help you get started, we’ve selected a few lbuild examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github modm-io / lbuild / lbuild / filter.py View on Github external
def listify(*node):
    return lbuild.utils.listify(*node)
github modm-io / lbuild / lbuild / api.py View on Github external
def _filter_modules(self, modules=None):
        if self.parser._undefined_repo_options():
            return []
        self.parser.config.modules.extend(listify(modules))
        selected_modules = self.parser.find_modules(self.parser.config.modules)
        return self.parser.resolve_dependencies(selected_modules)
github modm-io / lbuild / lbuild / option.py View on Github external
def _update_dependencies(self):
        if self._dependency_handler:
            deps = lbuild.utils.listify(self._dependency_handler(self._input))
            self.parent.add_dependencies(*deps)
github modm-io / lbuild / lbuild / buildlog.py View on Github external
def __init__(self, module_name, outpath, module_path,
                 filename_in: str, filename_out: str, time=None, metadata=None):
        self.module_name = module_name
        self.time = time
        self.metadata = collections.defaultdict(set)
        if metadata:
            for key, values in metadata.items():
                for value in lbuild.utils.listify(values):
                    self.metadata[key].add(value)

        self.outpath = abspath(outpath)
        self.inpath = abspath(module_path)

        self.filename_in = abspath(filename_in)
        self.filename_out = abspath(filename_out)
github modm-io / lbuild / lbuild / api.py View on Github external
file_config = ConfigNode()
            else:
                file_config = filesystem_config
        # 2. config is file: create file config and extend if with filesystem config
        elif os.path.exists(config):
            file_config = ConfigNode.from_file(config)
            if file_config is not None:
                file_config.extend_last(filesystem_config)
        # 3. config is alias: create virtual config and extend it with alias
        else:
            file_config = ConfigNode()
            file_config.filename = "command-line"
            file_config._extends["command-line"].append(config)

        self.config = file_config
        self.config.add_commandline_options(listify(options))
        self.config.add_commandline_collectors(listify(collectors))
        self.parser = Parser(self.config)