__init__.py 文件源码

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

项目:ronin 作者: tliron 项目源码 文件源码
def __init__(self, command=None, jobs=None):
        """
        :param command: ``cargo`` command; defaults to the context's ``rust.cargo_command``
        :type command: basestring or ~types.FunctionType
        :param jobs: number of jobs; defaults to CPU count + 1
        :type jobs: int
        """

        super(CargoBuild, self).__init__()
        self.command = lambda ctx: which(ctx.fallback(command, 'rust.cargo_command',
                                                      DEFAULT_CARGO_COMMAND))
        self.add_argument('build')
        self.add_argument_unfiltered('--manifest-path', '$in')
        if jobs is None:
            jobs = cpu_count() + 1
        self.jobs(jobs)
        self.hooks.append(_cargo_output_path_hook)
        self.hooks.append(_cargo_debug_hook)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号