当前位置: 首页>>代码示例>>Python>>正文


Python conf.cmd_to_list函数代码示例

本文整理汇总了Python中waflib.Configure.conf.cmd_to_list函数的典型用法代码示例。如果您正苦于以下问题:Python cmd_to_list函数的具体用法?Python cmd_to_list怎么用?Python cmd_to_list使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了cmd_to_list函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: mkspec_gxx_configure

def mkspec_gxx_configure(conf, major, minor, prefix=None, minimum=False):
    """
    :param major:   The major version number of the compiler, e.g. 4
    :param minor:   The minor version number of the compiler, e.g. 6
    :param prefix:  Prefix to the compiler name, e.g. 'arm-linux-androideabi'
    :param minimum: Only check for a minimum compiler version, if true
    """
    # Where to look for the compiler
    paths = conf.mkspec_get_toolchain_paths()

    # Find g++ first
    gxx_names = conf.mkspec_get_gnu_binary_name('g++', major, minor, prefix)
    if minimum:
        gxx_names = 'g++'
    cxx = conf.find_program(gxx_names, path_list=paths)
    cxx = conf.cmd_to_list(cxx)
    conf.env['CXX'] = cxx
    conf.env['CXX_NAME'] = os.path.basename(conf.env.get_flat('CXX'))
    if minimum:
        conf.mkspec_check_minimum_cc_version(cxx, major, minor)
    else:
        conf.mkspec_check_cc_version(cxx, major, minor)

    # Also find gcc
    gcc_names = conf.mkspec_get_gnu_binary_name('gcc', major, minor, prefix)
    if minimum:
        gcc_names = 'gcc'
    cc = conf.find_program(gcc_names, path_list=paths)
    cc = conf.cmd_to_list(cc)
    conf.env['CC'] = cc
    conf.env['CC_NAME'] = os.path.basename(conf.env.get_flat('CC'))
    if minimum:
        conf.mkspec_check_minimum_cc_version(cc, major, minor)
    else:
        conf.mkspec_check_cc_version(cc, major, minor)

    # Find the archiver
    ar = conf.mkspec_get_ar_binary_name(prefix)
    conf.find_program(ar, path_list=paths, var='AR')
    conf.env.ARFLAGS = 'rcs'

    # Set up C++ tools and flags
    conf.gxx_common_flags()
    conf.gxx_modifier_platform()
    conf.cxx_load_tools()
    conf.cxx_add_flags()

    # Also set up C tools and flags
    conf.gcc_common_flags()
    conf.gcc_modifier_platform()
    conf.cc_load_tools()
    conf.cc_add_flags()

    # Add linker flags
    conf.link_add_flags()

    # Add our own cxx flags
    conf.mkspec_set_gxx_cxxflags()
    # Add our own cc flags
    conf.mkspec_set_gcc_ccflags()
开发者ID:GOPRO1955,项目名称:external-waf-tools,代码行数:60,代码来源:gxx_common.py

示例2: find_android_gxx

def find_android_gxx(conf):
	exeDir = os.path.join(conf.options.ndk, "toolchains", "arm-linux-androideabi-4.6", "prebuilt", "windows-x86_64", "bin")
	cxx=conf.find_program(['arm-linux-androideabi-g++'], var = "CXX", path_list=[exeDir])
	cxx=conf.cmd_to_list(cxx)
	conf.get_cc_version(cxx,gcc=True)
	conf.env.CXX_NAME='gcc'
	conf.env.CXX=cxx
开发者ID:pixpil,项目名称:gii,代码行数:7,代码来源:android-gxx.py

示例3: check_cython_version

def check_cython_version(conf, minver):
    conf.start_msg("Checking cython version")
    minver = tuple(minver)
    import re
    version_re = re.compile(r'cython\s*version\s*(?P<major>\d*)\.(?P<minor>\d*)(?:\.(?P<micro>\d*))?', re.I).search
    cmd = conf.cmd_to_list(conf.env['CYTHON'])
    cmd = cmd + ['--version']
    from waflib.Tools import fc_config
    stdout, stderr = fc_config.getoutput(conf, cmd)
    if stdout:
        match = version_re(stdout)
    else:
        match = version_re(stderr)
    if not match:
        conf.fatal("cannot determine the Cython version")
    cy_ver = [match.group('major'), match.group('minor')]
    if match.group('micro'):
        cy_ver.append(match.group('micro'))
    else:
        cy_ver.append('0')
    cy_ver = tuple([int(x) for x in cy_ver])
    if cy_ver < minver:
        conf.end_msg(False)
        conf.fatal("cython version %s < %s" % (cy_ver, minver))
    conf.end_msg(str(cy_ver))
开发者ID:dagss,项目名称:distarray-old,代码行数:25,代码来源:cython.py

示例4: find_solstudio

def find_solstudio(conf):
	"""Find the Solaris Studio compiler (will look in the environment variable 'FC')"""

	fc = conf.find_program(['sunf95', 'f95', 'sunf90', 'f90'], var='FC')
	fc = conf.cmd_to_list(fc)
	conf.get_solstudio_version(fc)
	conf.env.FC_NAME = 'SOL'
开发者ID:Anastasia1302,项目名称:code-pile,代码行数:7,代码来源:fc_solstudio.py

示例5: find_openf95

def find_openf95(conf):
	"""Find the Open64 Fortran Compiler (will look in the environment variable 'FC')"""

	fc = conf.find_program(['openf95', 'openf90'], var='FC')
	fc = conf.cmd_to_list(fc)
	conf.get_open64_version(fc)
	conf.env.FC_NAME='OPEN64'
开发者ID:jrossi,项目名称:waf,代码行数:7,代码来源:fc_open64.py

示例6: find_gfortran

def find_gfortran(conf):
    """Find the gfortran program (will look in the environment variable 'FC')"""
    fc = conf.find_program(["gfortran", "g77"], var="FC")
    # (fallback to g77 for systems, where no gfortran is available)
    fc = conf.cmd_to_list(fc)
    conf.get_gfortran_version(fc)
    conf.env.FC_NAME = "GFORTRAN"
开发者ID:RedHatter,项目名称:diodon-plugins,代码行数:7,代码来源:gfortran.py

示例7: find_crayftn

def find_crayftn(conf):
	"""Find the Cray fortran compiler (will look in the environment variable 'FC')"""
	fc = conf.find_program(['crayftn'], var='FC')
	fc = conf.cmd_to_list(fc)
	conf.get_crayftn_version(fc)
	conf.env.FC_NAME = 'CRAY'
	conf.env.FC_MOD_CAPITALIZATION = 'UPPER.mod'
开发者ID:Dzshiftt,项目名称:Gnomescroll,代码行数:7,代码来源:fc_cray.py

示例8: find_xlf

def find_xlf(conf):
	"""Find the xlf program (will look in the environment variable 'FC')"""

	fc = conf.find_program(['xlf2003_r', 'xlf2003', 'xlf95_r', 'xlf95', 'xlf90_r', 'xlf90', 'xlf_r', 'xlf'], var='FC')
	fc = conf.cmd_to_list(fc)
	conf.get_xlf_version(fc)
	conf.env.FC_NAME='XLF'
开发者ID:jrossi,项目名称:waf,代码行数:7,代码来源:fc_xlf.py

示例9: find_xlc

def find_xlc(conf):
	"""
	Detect the Aix C compiler
	"""
	cc = conf.find_program(['xlc_r', 'xlc'], var='CC')
	cc = conf.cmd_to_list(cc)
	conf.env.CC_NAME = 'xlc'
	conf.env.CC      = cc
开发者ID:ita1024,项目名称:node,代码行数:8,代码来源:xlc.py

示例10: find_nag

def find_nag(conf):
	"""Find the NAG Fortran Compiler (will look in the environment variable 'FC')"""

	fc = conf.find_program(['nagfor'], var='FC')
	fc = conf.cmd_to_list(fc)
	conf.get_nag_version(fc)
	conf.env.FC_NAME = 'NAG'
	conf.env.FC_MOD_CAPITALIZATION = 'lower'
开发者ID:aeberspaecher,项目名称:waf,代码行数:8,代码来源:fc_nag.py

示例11: find_xlcxx

def find_xlcxx(conf):
	"""
	Detect the Aix C++ compiler
	"""
	cxx = conf.find_program(['xlc++_r', 'xlc++'], var='CXX')
	cxx = conf.cmd_to_list(cxx)
	conf.env.CXX_NAME = 'xlc++'
	conf.env.CXX      = cxx
开发者ID:jrossi,项目名称:waf,代码行数:8,代码来源:xlcxx.py

示例12: find_xlcxx

def find_xlcxx(conf):
    """
	Detect the Aix C++ compiler
	"""
    cxx = conf.find_program(["xlc++_r", "xlc++"], var="CXX")
    cxx = conf.cmd_to_list(cxx)
    conf.env.CXX_NAME = "xlc++"
    conf.env.CXX = cxx
开发者ID:ita1024,项目名称:node,代码行数:8,代码来源:xlcxx.py

示例13: find_gxx

def find_gxx(conf):
    """
	Find the program g++, and if present, try to detect its version number
	"""
    cxx = conf.find_program(["g++", "c++"], var="CXX")
    cxx = conf.cmd_to_list(cxx)
    conf.get_cc_version(cxx, gcc=True)
    conf.env.CXX_NAME = "gcc"
    conf.env.CXX = cxx
开发者ID:jrossi,项目名称:waf,代码行数:9,代码来源:gxx.py

示例14: find_gcc

def find_gcc(conf):
	"""
	Find the program gcc, and if present, try to detect its version number
	"""
	cc = conf.find_program(['gcc', 'cc'], var='CC')
	cc = conf.cmd_to_list(cc)
	conf.get_cc_version(cc, gcc=True)
	conf.env.CC_NAME = 'gcc'
	conf.env.CC      = cc
开发者ID:anthonyrisinger,项目名称:zippy,代码行数:9,代码来源:gcc.py

示例15: find_arm_gcc

def find_arm_gcc(conf):
	"""
	Find the program gcc, and if present, try to detect its version number
	"""
	cc = conf.find_program(['arm-none-eabi-gcc', 'arm-none-linux-gnueabi-gcc'], var='CC')
	cc = conf.cmd_to_list(cc)
	conf.get_cc_version(cc, gcc=True)
	conf.env.CC_NAME = 'arm-gcc'
	conf.env.CC      = cc
开发者ID:imanaskari,项目名称:swiftler-bones,代码行数:9,代码来源:arm_gcc.py


注:本文中的waflib.Configure.conf.cmd_to_list函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。