def use_prefix(f):
@click.option('-p', '--prefix', help='Set prefix used to install packages')
@click.option('-v', '--verbose', is_flag=True, help="Enable verbose mode")
@click.option('-B', '--build-path', help='Set the path for the build directory to use when building the package')
@click.pass_obj
@functools.wraps(f)
def w(obj, prefix, verbose, build_path, *args, **kwargs):
p = CGetPrefix(prefix or obj.get('PREFIX'), verbose or obj.get('VERBOSE'), build_path or obj.get('BUILD_PATH'))
f(p, *args, **kwargs)
return w
评论列表
文章目录