How to use the pybombs.commands.CommandBase.__init__ function in PyBOMBS

To help you get started, we’ve selected a few PyBOMBS 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 gnuradio / pybombs / pybombs / commands / config.py View on Github external
def __init__(self, cmd, args):
        CommandBase.__init__(self,
            cmd, args,
            load_recipes=False,
            require_prefix=False,
        )
        # Figure out which config file to write to
        self.cfg_file = self.cfg.local_cfg
        prefix = self.cfg.get_active_prefix()
        if self.args.config_file is not None:
            self.cfg_file = self.args.config_file
        elif prefix.prefix_dir is not None and prefix.prefix_src == "cli":
            self.cfg_file = prefix.cfg_file
        self.log.info("Using config file: {0}".format(self.cfg_file))
github gnuradio / pybombs / pybombs / commands / remove.py View on Github external
def __init__(self, cmd, args):
        CommandBase.__init__(self,
                cmd, args,
                load_recipes=False,
                require_prefix=True,
        )
        self.args.packages = args.packages[0]
        if len(self.args.packages) == 0:
            self.log.error("No packages specified.")
            raise PBException("No packages specified.")
        # Do not allow any non-source packagers for this:
        self.cfg.set('packagers', '')
        self.pm = package_manager.PackageManager()
        if not self.args.no_deps:
            self.args.packages = self.get_dependees(self.args.packages)
github gnuradio / pybombs / pybombs / commands / deploy.py View on Github external
def __init__(self, cmd, args):
        CommandBase.__init__(
            self,
            cmd, args,
            load_recipes=False,
            require_prefix=True,
        )
github gnuradio / pybombs / pybombs / commands / init.py View on Github external
def __init__(self, cmd, args):
        CommandBase.__init__(self,
                cmd, args,
                load_recipes=False,
                require_prefix=False,
                require_inventory=False
        )
github gnuradio / pybombs / pybombs / commands / inv.py View on Github external
def __init__(self, cmd, args):
        CommandBase.__init__(self, cmd, args, require_prefix=True)
        verb = "Showing" if self.args.value is None else "Setting"
        if self.args.key is None:
            print("{verb} package state:".format(verb=verb))
        else:
            print("{verb} value for key `{key}':".format(verb=verb, key=self.args.key))
github gnuradio / pybombs / pybombs / commands / show.py View on Github external
def __init__(self, cmd, args):
        CommandBase.__init__(self,
                cmd, args,
                load_recipes=True,
                require_prefix=False,
        )
        self.package_manager = package_manager.PackageManager()
        if args.all:
            self.args.packages = recipe_manager.list_all()
        else:
            self.args.packages = args.packages[0] # wat?
        if len(self.args.packages) == 0:
            self.log.error("No packages specified.")
            return 1
github gnuradio / pybombs / pybombs / commands / help.py View on Github external
def __init__(self, cmd, args):
        CommandBase.__init__(self,
                cmd, args,
                load_recipes=False,
                require_prefix=False,
        )
github gnuradio / pybombs / pybombs / commands / digraph.py View on Github external
def __init__(self, cmd, args):
        CommandBase.__init__(self,
            cmd, args,
            load_recipes=True,
            require_prefix=True,
        )
        Requirer.__init__(self)
        self.packages = []
        if self.args.all:
            self.packages = recipe_manager.recipe_manager.list_all()
        else:
            self.packages = self.inventory.get_packages()
        self.assert_requirements()