python.py 文件源码

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

项目:SoCFoundationFlow 作者: mattaw 项目源码 文件源码
def configure(conf):
    """
    Detect the python interpreter
    """
    v = conf.env
    v['PYTHON'] = Options.options.python or os.environ.get('PYTHON', sys.executable)
    if Options.options.pythondir:
        v['PYTHONDIR'] = Options.options.pythondir
    if Options.options.pythonarchdir:
        v['PYTHONARCHDIR'] = Options.options.pythonarchdir

    conf.find_program('python', var='PYTHON')

    v['PYFLAGS'] = ''
    v['PYFLAGS_OPT'] = '-O'

    v['PYC'] = getattr(Options.options, 'pyc', 1)
    v['PYO'] = getattr(Options.options, 'pyo', 1)

    try:
        v.PYTAG = conf.cmd_and_log(conf.env.PYTHON + ['-c', "import imp;print(imp.get_tag())"]).strip()
    except Errors.WafError:
        pass
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号