本文整理汇总了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)
示例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)
示例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)
示例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)
示例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')
示例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)
示例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)