fc_nag.py 文件源码

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

项目:SoCFoundationFlow 作者: mattaw 项目源码 文件源码
def get_nag_version(conf, fc):
    """Get the NAG compiler version"""

    version_re = re.compile(r"^NAG Fortran Compiler *Release *(?P<major>\d*)\.(?P<minor>\d*)", re.M).search
    cmd = fc + ['-v']

    out, err = fc_config.getoutput(conf,cmd,stdin=False)
    if out:
        match = version_re(out)
        if not match:
            match = version_re(err)
    else: match = version_re(err)
    if not match:
        conf.fatal('Could not determine the NAG version.')
    k = match.groupdict()
    conf.env['FC_VERSION'] = (k['major'], k['minor'])
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号