• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Python conf.start_msg函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: check_libcmaes

def check_libcmaes(conf):
	if conf.options.libcmaes:
		includes_check = [conf.options.libcmaes + '/include']
		libs_check = [conf.options.libcmaes + '/lib']
	else:
		includes_check = ['/usr/local/include', '/usr/include']
		libs_check = ['/usr/local/lib', '/usr/lib', '/usr/lib/x86_64-linux-gnu/']

	incl = ''
	try:
		conf.start_msg('Checking for libcmaes includes (optional)')
		res = conf.find_file('libcmaes/cmaes.h', includes_check)
		incl = res[:-len('libcmaes/cmaes.h')-1]
		conf.end_msg(incl)
	except:
		conf.end_msg('Not found in %s' % str(includes_check), 'YELLOW')
		return 1
	conf.start_msg('Checking for libcmaes libs (optional)')
	lib_path = ''
	for lib in ['libcmaes.so', 'libcmaes.a', 'libcmaes.dylib']:
		try:
			res = conf.find_file(lib, libs_check)
			lib_path = res[:-len(lib)-1]
		except:
			continue
	if lib_path == '':
		conf.end_msg('Not found in %s' % str(libs_check), 'YELLOW')
		return 1
	else:
		conf.end_msg(lib_path)
		conf.env.INCLUDES_LIBCMAES = [incl]
		conf.env.LIBPATH_LIBCMAES = [lib_path]
		conf.env.DEFINES_LIBCMAES = ['USE_LIBCMAES']
		conf.env.LIB_LIBCMAES= ['cmaes']
	return 1
开发者ID:resibots,项目名称:limbo,代码行数:35,代码来源:libcmaes.py


示例2: 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


示例3: check_python_module

def check_python_module(conf,module_name,condition=''):
	msg="Checking for python module '%s'"%module_name
	if condition:
		msg='%s (%s)'%(msg,condition)
	conf.start_msg(msg)
	try:
		ret=conf.cmd_and_log(conf.env['PYTHON']+['-c',PYTHON_MODULE_TEMPLATE%module_name])
	except Exception:
		conf.end_msg(False)
		conf.fatal('Could not find the python module %r'%module_name)
	ret=ret.strip()
	if condition:
		conf.end_msg(ret)
		if ret=='unknown version':
			conf.fatal('Could not check the %s version'%module_name)
		from distutils.version import LooseVersion
		def num(*k):
			if isinstance(k[0],int):
				return LooseVersion('.'.join([str(x)for x in k]))
			else:
				return LooseVersion(k[0])
		d={'num':num,'ver':LooseVersion(ret)}
		ev=eval(condition,{},d)
		if not ev:
			conf.fatal('The %s version does not satisfy the requirements'%module_name)
	else:
		if ret=='unknown version':
			conf.end_msg(True)
		else:
			conf.end_msg(ret)
开发者ID:markreyn,项目名称:ndnSIMx,代码行数:30,代码来源:python.py


示例4: check_nlopt

def check_nlopt(conf):
	if conf.options.nlopt:
		includes_check = [conf.options.nlopt + '/include']
		libs_check = [conf.options.nlopt + '/lib']
	else:
		includes_check = ['/usr/local/include', '/usr/include']
		libs_check = ['/usr/local/lib', '/usr/lib', '/usr/lib/x86_64-linux-gnu/']
		if 'RESIBOTS_DIR' in os.environ:
			includes_check = [os.environ['RESIBOTS_DIR'] + '/include'] + includes_check
			libs_check = [os.environ['RESIBOTS_DIR'] + '/lib'] + libs_check

	try:
		conf.start_msg('Checking for NLOpt includes')
		res = conf.find_file('nlopt.hpp', includes_check)
		conf.end_msg('ok')
	except:
		conf.end_msg('Not found', 'RED')
		return 1
	conf.start_msg('Checking for NLOpt libs')
	found = False
	for lib in ['libnlopt_cxx.so', 'libnlopt_cxx.a', 'libnlopt_cxx.dylib']:
		try:
			found = found or conf.find_file(lib, libs_check)
		except:
			continue
	if not found:
		conf.end_msg('Not found', 'RED')
		return 1
	else:
		conf.end_msg('ok')
		conf.env.INCLUDES_NLOPT = includes_check
		conf.env.LIBPATH_NLOPT = libs_check
		conf.env.DEFINES_NLOPT = ['USE_NLOPT']
		conf.env.LIB_NLOPT = ['nlopt_cxx']
	return 1
开发者ID:johnjsb,项目名称:limbo,代码行数:35,代码来源:nlopt.py


示例5: check_hexapod_controller

def check_hexapod_controller(conf):
    includes_check = ['/usr/local/include', '/usr/include']
    libs_check = ['/usr/local/lib', '/usr/lib']

    if 'RESIBOTS_DIR' in os.environ:
        includes_check = [os.environ['RESIBOTS_DIR'] + '/include'] + includes_check
        libs_check = [os.environ['RESIBOTS_DIR'] + '/lib'] + libs_check

    if conf.options.controller:
        includes_check = [conf.options.controller + '/include']
        libs_check = [conf.options.controller + '/lib']

    try:
        conf.start_msg('Checking for hexapod_controller includes')
        res = conf.find_file('hexapod_controller/hexapod_controller_simple.hpp', includes_check)
        conf.end_msg('ok')
        conf.start_msg('Checking for hexapod_controller libs')
        res = res and conf.find_file('libhexapod_controller_simple.a', libs_check)
        conf.end_msg('ok')
        conf.env.INCLUDES_HEXAPOD_CONTROLLER = includes_check
        conf.env.STLIBPATH_HEXAPOD_CONTROLLER = libs_check
        conf.env.STLIB_HEXAPOD_CONTROLLER = ['hexapod_controller_simple']
    except:
        conf.end_msg('Not found', 'RED')
        return
    return 1
开发者ID:resibots,项目名称:hexapod_simu,代码行数:26,代码来源:hexapod_controller.py


示例6: check_omni_vrep

def check_omni_vrep(conf, **kw):
    required = 'required' in kw and kw.get('required', False)
    includes_check = ['/usr/include', '/usr/local/include']
    resibots_dir = conf.options.resibots if hasattr(conf.options, 'resibots') and conf.options.resibots else None

    if resibots_dir:
        includes_check = [resibots_dir + '/include'] + includes_check

    if conf.options.omni_vrep:
        includes_check = [conf.options.omni_vrep + '/include'] + includes_check

    conf.start_msg('Checking for omni_vrep includes')
    try:
        res = conf.find_file('omni_vrep/omnipointer.hpp', includes_check)
    except:
        res = False

    if res:
        conf.env.INCLUDES_OMNI_VREP = [os.path.expanduser(include) for include in includes_check]
        conf.env.DEFINES_OMNI_VREP = ['USE_OMNI_VREP']
        conf.end_msg('ok')
    else:
        if conf.options.omni_vrep and resibots_dir:
            msg = 'not found in %s nor in %s' % (conf.options.omni_vrep, resibots_dir)
        elif conf.options.omni_vrep or resibots_dir:
            msg = 'not found in %s' % (conf.options.omni_vrep if conf.options.omni_vrep else resibots_dir)
        else:
            msg = 'not found, use --omni_vrep=/path/to/omni_vrep or --resibots=/path/to/resibots'

        if required:
            conf.fatal(msg)
        else:
            conf.end_msg(msg, 'YELLOW')
开发者ID:dtbinh,项目名称:omni_simu,代码行数:33,代码来源:omni_vrep.py


示例7: check_python_module

def check_python_module(conf, module_name, condition=""):
    msg = "Checking for python module '%s'" % module_name
    if condition:
        msg = "%s (%s)" % (msg, condition)
    conf.start_msg(msg)
    try:
        ret = conf.cmd_and_log(conf.env["PYTHON"] + ["-c", PYTHON_MODULE_TEMPLATE % module_name])
    except Exception:
        conf.end_msg(False)
        conf.fatal("Could not find the python module %r" % module_name)
    ret = ret.strip()
    if condition:
        conf.end_msg(ret)
        if ret == "unknown version":
            conf.fatal("Could not check the %s version" % module_name)
        from distutils.version import LooseVersion

        def num(*k):
            if isinstance(k[0], int):
                return LooseVersion(".".join([str(x) for x in k]))
            else:
                return LooseVersion(k[0])

        d = {"num": num, "ver": LooseVersion(ret)}
        ev = eval(condition, {}, d)
        if not ev:
            conf.fatal("The %s version does not satisfy the requirements" % module_name)
    else:
        if ret == "unknown version":
            conf.end_msg(True)
        else:
            conf.end_msg(ret)
开发者ID:JanDeng25,项目名称:ndn,代码行数:32,代码来源:python.py


示例8: check_libdynamixel

def check_libdynamixel(conf, **kw):
    required = 'required' in kw and kw.get('required', False)
    includes_check = ['/usr/include', '/usr/local/include']
    resibots_dir = conf.options.resibots if hasattr(conf.options, 'resibots') and conf.options.resibots else None

    if resibots_dir:
        includes_check = [resibots_dir + '/include'] + includes_check

    if conf.options.libdynamixel:
        includes_check = [conf.options.libdynamixel + '/include'] + includes_check

    conf.start_msg('Checking for libdynamixel includes')
    try:
        res = conf.find_file('dynamixel/dynamixel.hpp', includes_check)
    except:
        res = False

    if res:
        conf.env.INCLUDES_LIBDYNAMIXEL = [os.path.expanduser(include) for include in includes_check]
        conf.env.DEFINES_LIBDYNAMIXEL = ['USE_LIBDYNAMIXEL']
        conf.end_msg('ok')
    else:
        if conf.options.libdynamixel and resibots_dir:
            msg = 'not found in %s nor in %s' % (conf.options.libdynamixel, resibots_dir)
        elif conf.options.libdynamixel or resibots_dir:
            msg = 'not found in %s' % (conf.options.libdynamixel if conf.options.libdynamixel else resibots_dir)
        else:
            msg = 'not found, use --libdynamixel=/path/to/libdynamixel or --resibots=/path/to/resibots'

        if required:
            conf.fatal(msg)
        else:
            conf.end_msg(msg, 'YELLOW')
开发者ID:resibots,项目名称:libdynamixel,代码行数:33,代码来源:libdynamixel.py


示例9: mkspec_try_flags

def mkspec_try_flags(conf, flagtype, flaglist):
    """
    Tries the given list of compiler/linker flags if they are supported by the
    current compiler, and returns the list of supported flags

    :param flagtype: The flag type, cflags, cxxflags or linkflags
    :param flaglist: The list of flags to be checked

    :return: The list of supported flags
    """
    ret = []

    for flag in flaglist:
        conf.start_msg("Checking for %s: %s" % (flagtype, flag))
        try:
            if flagtype == "cflags":
                conf.check_cc(cflags=flag)
            elif flagtype == "cxxflags":
                conf.check_cxx(cxxflags=flag)
            elif flagtype == "linkflags":
                conf.check_cxx(linkflags=flag)
        except conf.errors.ConfigurationError:
            conf.end_msg("no", color="YELLOW")
        else:
            conf.end_msg("yes")
            ret.append(flag)

    return ret
开发者ID:GOPRO1955,项目名称:external-waf-tools,代码行数:28,代码来源:cxx_common.py


示例10: check_eigen

def check_eigen(conf, **kw):
    required = 'required' in kw and kw.get('required', False)
    includes_check = ['/usr/include/eigen3', '/usr/local/include/eigen3', '/usr/include', '/usr/local/include']
    resibots_dir = conf.options.resibots if hasattr(conf.options, 'resibots') and conf.options.resibots else None

    if resibots_dir:
        includes_check = [resibots_dir + '/include'] + includes_check

    if conf.options.eigen:
        includes_check = [conf.options.eigen + '/include'] + includes_check

    conf.start_msg('Checking for Eigen includes')
    try:
        res = conf.find_file('Eigen/Core', includes_check)
    except:
        res = False

    if res:
        conf.env.INCLUDES_EIGEN = [os.path.expanduser(include) for include in includes_check]
        conf.env.DEFINES_EIGEN = ['USE_EIGEN']
        conf.end_msg('ok')
    else:
        if conf.options.eigen and resibots_dir:
            msg = 'not found in %s nor in %s' % (conf.options.eigen, resibots_dir)
        elif conf.options.eigen or resibots_dir:
            msg = 'not found in %s' % (conf.options.eigen if conf.options.eigen else resibots_dir)
        else:
            msg = 'not found, use --eigen=/path/to/eigen or --resibots=/path/to/resibots'

        if required:
            conf.fatal(msg)
        else:
            conf.end_msg(msg, 'YELLOW')
开发者ID:dtbinh,项目名称:omni_simu,代码行数:33,代码来源:eigen.py


示例11: check_libcmaes

def check_libcmaes(conf):
	if conf.options.libcmaes:
		includes_check = [conf.options.libcmaes + '/include']
		libs_check = [conf.options.libcmaes + '/lib']
	else:
		includes_check = ['/usr/local/include', '/usr/include']
		libs_check = ['/usr/local/lib', '/usr/lib']

	try:
		conf.start_msg('Checking for libcmaes includes')
		res = conf.find_file('libcmaes/cmaes.h', includes_check)
		conf.end_msg('ok')
	except:
		conf.end_msg('Not found', 'RED')
		return 1
	conf.start_msg('Checking for libcmaes libs')
	found = False
	for lib in ['libcmaes.so', 'libcmaes.a', 'libcmaes.dylib']:
		try:
			found = found or conf.find_file(lib, libs_check)
		except:
			continue
	if not found:
		conf.end_msg('Not found', 'RED')
		return 1
	else:
		conf.end_msg('ok')
		conf.env.INCLUDES_LIBCMAES = includes_check
		conf.env.LIBPATH_LIBCMAES = libs_check
		conf.env.DEFINES_LIBCMAES = ['USE_LIBCMAES']
		conf.env.LIB_LIBCMAES= ['cmaes']
	return 1
开发者ID:johnjsb,项目名称:limbo,代码行数:32,代码来源:libcmaes.py


示例12: check_python_module

def check_python_module(conf,module_name):
	conf.start_msg('Python module %s'%module_name)
	try:
		conf.cmd_and_log([conf.env['PYTHON'],'-c','import %s\nprint(1)\n'%module_name])
	except:
		conf.end_msg(False)
		conf.fatal('Could not find the python module %r'%module_name)
	conf.end_msg(True)
开发者ID:RunarFreyr,项目名称:waz,代码行数:8,代码来源:python.py


示例13: check_python_module

def check_python_module(conf, module_name):
    conf.start_msg("Python module %s" % module_name)
    try:
        conf.cmd_and_log(conf.env["PYTHON"] + ["-c", PYTHON_MODULE_TEMPLATE % module_name])
    except:
        conf.end_msg(False)
        conf.fatal("Could not find the python module %r" % module_name)
    conf.end_msg(True)
开发者ID:janbre,项目名称:NUTS,代码行数:8,代码来源:python.py


示例14: check_python_module

def check_python_module(conf,module_name):
	conf.start_msg('Python module %s'%module_name)
	try:
		conf.cmd_and_log(conf.env['PYTHON']+['-c',PYTHON_MODULE_TEMPLATE%module_name])
	except:
		conf.end_msg(False)
		conf.fatal('Could not find the python module %r'%module_name)
	conf.end_msg(True)
开发者ID:FlavioFalcao,项目名称:osmbrowser,代码行数:8,代码来源:python.py


示例15: configure

def configure(conf):
	conf.start_msg('Checking for program module')
	# this does not work, since module is exported as a function on valgol:
	# conf.find_program('module')
	# Therfore:
	if os.system('source /usr/local/Modules/current/init/bash && module purge') == 0:
		conf.end_msg('module')
	else:
		conf.end_msg('module not found')
		conf.fatal('Could not find the program module')
开发者ID:electronicvisions,项目名称:brick,代码行数:10,代码来源:modules.py


示例16: check_python_module

def check_python_module(conf, module_name):
	"""
	Check if the selected python interpreter can import the given python module.
	"""
	conf.start_msg('Python module %s' % module_name)
	try:
		conf.cmd_and_log([conf.env['PYTHON'], '-c', 'import %s\nprint(1)\n' % module_name])
	except:
		conf.end_msg(False)
		conf.fatal('Could not find the python module %r' % module_name)
	conf.end_msg(True)
开发者ID:RunarFreyr,项目名称:waz,代码行数:11,代码来源:python.py


示例17: configure

def configure(conf):
    """
    The configure function for the bundle dependency tool
    :param conf: the configuration context
    """
    conf.load('wurf_dependency_resolve')

    # Get the path where the bundled dependencies should be
    # placed
    bundle_path = expand_path(conf.options.bundle_path)

    # List all the dependencies to be bundled
    bundle_list = expand_bundle(conf, conf.options.bundle)

    # List all the dependencies with an explicit path
    explicit_list = explicit_dependencies(conf.options)

    # Make sure that no dependencies were both explicitly specified
    # and specified as bundled
    overlap = set(bundle_list).intersection(set(explicit_list))

    if len(overlap) > 0:
        conf.fatal("Overlapping dependencies %r" % overlap)

    conf.env['BUNDLE_DEPENDENCIES'] = dict()

    # Loop over all dependencies and fetch the ones
    # specified in the bundle_list
    for name in bundle_list:

        Utils.check_dir(bundle_path)

        conf.start_msg('Resolve dependency %s' % name)

        key = DEPENDENCY_CHECKOUT_KEY % name
        dependency_checkout = getattr(conf.options, key, None)

        dependency_path = dependencies[name].resolve(
            ctx=conf,
            path=bundle_path,
            use_checkout=dependency_checkout)

        conf.end_msg(dependency_path)

        conf.env['BUNDLE_DEPENDENCIES'][name] = dependency_path

    for name in explicit_list:
        key = DEPENDENCY_PATH_KEY % name
        dependency_path = getattr(conf.options, key)
        dependency_path = expand_path(dependency_path)

        conf.start_msg('User resolve dependency %s' % name)
        conf.env['BUNDLE_DEPENDENCIES'][name] = dependency_path
        conf.end_msg(dependency_path)
开发者ID:nitesh5513,项目名称:external-waf,代码行数:54,代码来源:wurf_dependency_bundle.py


示例18: check_sdl

def check_sdl(conf):
	conf.start_msg('Checking for SDL (1.2 - sdl-config)')

	try:
		conf.check_cfg(path='sdl-config', args='--cflags --libs', package='', uselib_store='SDL')
	except:
		conf.end_msg('sdl-config not found', 'RED')
		return 1
	conf.end_msg('ok')
	conf.env.DEFINES_SDL += ['USE_SDL']
	return 1
开发者ID:jbmouret,项目名称:libfastsim,代码行数:11,代码来源:sdl.py


示例19: check_numpy_version

def check_numpy_version(conf, minver, maxver=None):
    conf.start_msg("Checking numpy version")
    minver = tuple(minver)
    if maxver: maxver = tuple(maxver)
    (np_ver_str,) = conf.get_python_variables(
            ['numpy.version.short_version'], ['import numpy'])
    np_ver = tuple([int(x) for x in np_ver_str.split('.')])
    if np_ver < minver or (maxver and np_ver > maxver):
        conf.end_msg(False)
        conf.fatal("numpy version %s is not in the "
                "range of supported versions: minimum=%s, maximum=%s" % (np_ver_str, minver, maxver))
    conf.end_msg(str(np_ver))
开发者ID:dagss,项目名称:distarray-old,代码行数:12,代码来源:numpy.py


示例20: check_filesystem

def check_filesystem(conf):
    conf.start_msg('Checking filesystem support')
    try:
        conf.check_cxx(
         fragment='\n'.join([
          '#include <filesystem>',
          'int main() { std::tr2::sys::path path; }',
         ]),
         execute=False,
        )
        conf.define('STL_FILESYSTEM_ENABLED', 1)
        conf.end_msg('<filesystem>')
    except:
        conf.end_msg('<boost/filesystem.hpp>')
开发者ID:a-pavlov,项目名称:kodama,代码行数:14,代码来源:common.py



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Python conf.to_log函数代码示例发布时间:2022-05-26
下一篇:
Python conf.msg函数代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap