fpm.py 文件源码

python
阅读 28 收藏 0 点赞 0 评论 0

项目:gopythongo 作者: gopythongo 项目源码 文件源码
def add_args(self, parser: configargparse.ArgumentParser) -> None:
        gr_fpm = parser.add_argument_group("FPM Packer options")
        gr_fpm.add_argument("--use-fpm", dest="fpm", default="/usr/local/bin/fpm",
                            env_var="FPM_EXECUTABLE",
                            help="The full path to the fpm executable to use")
        gr_fpm.add_argument("--run-fpm", dest="run_fpm", action="append", metavar="OPTS_FILE",
                            default=[], const=".gopythongo/fpm_opts", nargs="?",
                            help="Execute FPM (can be used multiple times). You must pass a filename to this "
                                 "parameter, which specifies a file containing the command-line parameters for "
                                 "invoking FPM (one per line). FPM will be invoked with the CWD set to the build "
                                 "folder inside the selected builder. Templating is supported. You can use 'template:' "
                                 "prefixes INSIDE THE OPTS_FILE ITSELF and also process OPTS_FILE as a template. "
                                 "Default opts file: .gopythongo/fpm_opts")

        gr_opts = parser.add_argument_group("FPM related options (can also be used in OPTS_FILE):")
        gr_opts.add_argument("--fpm-format", dest="fpm_format", choices=["deb"], default="deb",
                             help="Output package format. Only 'deb' is supported for now")
        gr_opts.add_argument("--fpm-opts", dest="fpm_extra_opts", default="", env_var="FPM_OPTS",
                             help="Any string specified here will be directly appended to the FPM command-line when it "
                                  "is invoked, allowing you to specify arbitrary extra command-line parameters. Make "
                                  "sure that you use an equals sign, i.e. --fpm-opts='' to avoid 'Unknown parameter' "
                                  "errors! (http://bugs.python.org/issue9334).")
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号