本文整理汇总了Python中pybombs.commands.CommandBase类的典型用法代码示例。如果您正苦于以下问题:Python CommandBase类的具体用法?Python CommandBase怎么用?Python CommandBase使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了CommandBase类的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。
示例1: __init__
def __init__(self, cmd, args):
CommandBase.__init__(
self,
cmd, args,
load_recipes=False,
require_prefix=True,
)
开发者ID:johan--,项目名称:pybombs,代码行数:7,代码来源:deploy.py
示例2: __init__
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))
开发者ID:ClassOdUa,项目名称:pybombs,代码行数:7,代码来源:inv.py
示例3: __init__
def __init__(self, cmd, args):
CommandBase.__init__(self,
cmd, args,
load_recipes=True,
require_prefix=True,
)
self.pm = packagers.source.Source()
self.args.packages = args.packages[0]
if len(self.args.packages) == 0:
self.args.packages = self.inventory.get_packages()
开发者ID:n-west,项目名称:pybombs2,代码行数:10,代码来源:rebuild.py
示例4: __init__
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.get_cfg_file(args)
self.log.info("Using config file: {0}".format(self.cfg_file))
开发者ID:ClassOdUa,项目名称:pybombs,代码行数:10,代码来源:autoconfig.py
示例5: __init__
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()
开发者ID:n-west,项目名称:pybombs2,代码行数:12,代码来源:digraph.py
示例6: __init__
def __init__(self, cmd, args):
CommandBase.__init__(
self,
cmd, args,
load_recipes=True,
require_prefix=True,
)
self.args.packages = args.packages[0]
if len(self.args.packages) == 0 and not args.all:
self.log.error("No packages specified.")
exit(1)
if self.args.all:
self.args.deps = False
开发者ID:rbaindourov,项目名称:pybombs,代码行数:13,代码来源:fetch.py
示例7: __init__
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))
开发者ID:ClassOdUa,项目名称:pybombs,代码行数:14,代码来源:config.py
示例8: __init__
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.")
exit(1)
开发者ID:n-west,项目名称:pybombs2,代码行数:14,代码来源:show.py
示例9: __init__
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.")
exit(1)
# 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)
开发者ID:n-west,项目名称:pybombs2,代码行数:15,代码来源:remove.py
示例10: __init__
def __init__(self, cmd, args):
CommandBase.__init__(self,
cmd, args,
load_recipes=True,
require_prefix=False, # Not required for non-source builds
)
self.args.packages = args.packages[0]
get_all_pkgs = False
if len(self.args.packages) == 0:
if cmd == 'update':
get_all_pkgs = True
if not self.args.all:
self.args.no_deps = True
else:
self.log.error("No packages specified.")
raise PBException("No packages specified.")
self.update_if_exists = (cmd == 'update' or self.args.update)
self.fail_if_not_exists = (cmd == 'update')
if get_all_pkgs:
self.args.packages = self.inventory.get_packages()
self.install_manager = install_manager.InstallManager()
开发者ID:ClassOdUa,项目名称:pybombs,代码行数:21,代码来源:install.py
示例11: __init__
def __init__(self, cmd, args):
CommandBase.__init__(self,
cmd, args,
load_recipes=True,
require_prefix=(args.prefix_command != 'init'),
)
开发者ID:endland,项目名称:pybombs,代码行数:6,代码来源:prefix.py
示例12: __init__
def __init__(self, cmd, args):
CommandBase.__init__(self,
cmd, args,
require_prefix=False,
)
开发者ID:ClassOdUa,项目名称:pybombs,代码行数:5,代码来源:lint.py
注:本文中的pybombs.commands.CommandBase类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论