當前位置: 首頁>>代碼示例>>Python>>正文


Python waflib.Configure類代碼示例

本文整理匯總了Python中waflib.Configure的典型用法代碼示例。如果您正苦於以下問題:Python Configure類的具體用法?Python Configure怎麽用?Python Configure使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


在下文中一共展示了Configure類的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: update

def update(ctx):
	lst=os.listdir(Context.waf_dir+'/waflib/extras')
	for x in lst:
		if not x.endswith('.py'):
			continue
		tool=x.replace('.py','')
		Configure.download_tool(tool,force=True)
開發者ID:RunarFreyr,項目名稱:waz,代碼行數:7,代碼來源:Scripting.py

示例2: update

def update(ctx):
	"""download a specific tool into the local waf directory"""
	lst = os.listdir(Context.waf_dir + '/waflib/extras')
	for x in lst:
		if not x.endswith('.py'):
			continue
		tool = x.replace('.py', '')
		Configure.download_tool(tool, force=True)
開發者ID:RunarFreyr,項目名稱:waz,代碼行數:8,代碼來源:Scripting.py

示例3: update

def update(ctx):
	lst=Options.options.files.split(',')
	if not lst:
		lst=[x for x in Utils.listdir(Context.waf_dir+'/waflib/extras')if x.endswith('.py')]
	for x in lst:
		tool=x.replace('.py','')
		try:
			Configure.download_tool(tool,force=True,ctx=ctx)
		except Errors.WafError:
			Logs.error('Could not find the tool %s in the remote repository'%x)
開發者ID:PseudoSky,項目名稱:voodoo,代碼行數:10,代碼來源:Scripting.py

示例4: update

def update(ctx):
    """updates the plugins from the *waflib/extras* directory"""
    lst = Options.options.files.split(",")
    if not lst:
        lst = [x for x in Utils.listdir(Context.waf_dir + "/waflib/extras") if x.endswith(".py")]
    for x in lst:
        tool = x.replace(".py", "")
        try:
            Configure.download_tool(tool, force=True, ctx=ctx)
        except Errors.WafError:
            Logs.error("Could not find the tool %s in the remote repository" % x)
開發者ID:jsternberg,項目名稱:waf,代碼行數:11,代碼來源:Scripting.py

示例5: configure

def configure(conf):
	conf.find_program('msgfmt', var='MSGFMT')
	# NOTE: it is possible to set INTLTOOL in the environment, but it must not have spaces in it

	intltool = conf.find_program('intltool-merge', var='INTLTOOL')
	if not intltool:
		# if intltool-merge should not be mandatory, catch the thrown exception in your wscript
		if Options.platform == 'win32':
			perl = conf.find_program('perl', var='PERL')
			intltooldir = Configure.find_file('intltool-merge', os.environ['PATH'].split(os.pathsep))
			if not intltooldir:
				conf.fatal('The program intltool-merge (intltool, gettext-devel) is mandatory!')

			conf.env['INTLTOOL'] = Utils.to_list(conf.env['PERL']) + [intltooldir + os.sep + 'intltool-merge']
			conf.msg('Checking for intltool', ' '.join(conf.env['INTLTOOL']))
		else:
			conf.fatal('The program intltool-merge (intltool, gettext-devel) is mandatory!')

	def getstr(varname):
		return getattr(Options.options, varname, '')

	prefix  = conf.env['PREFIX']
	datadir = getstr('datadir')
	if not datadir: datadir = os.path.join(prefix,'share')

	conf.define('LOCALEDIR', os.path.join(datadir, 'locale'))
	conf.define('DATADIR', datadir)

	if conf.env['CC'] or conf.env['CXX']:
		# Define to 1 if <locale.h> is present
		conf.check(header_name='locale.h')
開發者ID:zsx,項目名稱:waf,代碼行數:31,代碼來源:intltool.py

示例6: configure

def configure(conf):
    if not conf.env.CYTHON:
        conf.fatal("cython_extra requires the tool 'cython' to be loaded first.")
    Configure.conf(check_cython_version)
開發者ID:chrippa,項目名稱:xmms2,代碼行數:4,代碼來源:cython_extra.py

示例7: add_obj_file

		self.link_task.inputs.append(node)
def add_obj_file(self,file):
	if not hasattr(self,'obj_files'):self.obj_files=[]
	if not'process_obj_files'in self.meths:self.meths.append('process_obj_files')
	self.obj_files.append(file)
old_define=Configure.ConfigurationContext.__dict__['define']
def define(self,key,val,quote=True):
	old_define(self,key,val,quote)
	if key.startswith('HAVE_'):
		self.env[key]=1
old_undefine=Configure.ConfigurationContext.__dict__['undefine']
def undefine(self,key):
	old_undefine(self,key)
	if key.startswith('HAVE_'):
		self.env[key]=0
def set_incdirs(self,val):
	Logs.warn('compat: change "export_incdirs" by "export_includes"')
	self.export_includes=val
TaskGen.task_gen.export_incdirs=property(None,set_incdirs)

TaskGen.feature('d')(old_importpaths)
TaskGen.before('apply_incpaths')(old_importpaths)
TaskGen.feature('c','cxx','d')(apply_uselib_local)
TaskGen.before('apply_incpaths','propagate_uselib_vars')(apply_uselib_local)
TaskGen.after('apply_link','process_source')(apply_uselib_local)
TaskGen.feature('cprogram','cxxprogram','cstlib','cxxstlib','cshlib','cxxshlib','dprogram','dstlib','dshlib')(apply_objdeps)
TaskGen.after('apply_link')(apply_objdeps)
TaskGen.after('apply_link')(process_obj_files)
TaskGen.taskgen_method(add_obj_file)
Configure.conf(define)
Configure.conf(undefine)
開發者ID:HariKishan8,項目名稱:Networks,代碼行數:31,代碼來源:compat15.py


注:本文中的waflib.Configure類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。