build.py 文件源码

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

项目:foxbms-setup 作者: foxBMS 项目源码 文件源码
def clean(mcu_switch=None, supress_output=False):
    cmd = TOOLCHAIN_BASIC_CONFIGURE +  ' '
    if mcu_switch is None:
        sphinx_build_dir = os.path.join('build', 'sphinx')
        if os.path.isdir(sphinx_build_dir):
            shutil.rmtree(sphinx_build_dir)
            print "Successfully removed sphinx documentation"
        else:
            print 'Nothing to clean...'
        return
    elif mcu_switch == '-p' or mcu_switch == '-s' or  mcu_switch == '-b' :
        cmd += ' ' + mcu_switch + ' ' + 'clean'
    else:
        print 'Invalid clean argument: \'{}\''.format(mcu_switch)
        sys.exit(1)
    start_process(cmd, supress_output)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号