Пример #1
0
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
0
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)
Пример #3
0
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)
Пример #4
0
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)
Пример #5
0
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)
Пример #6
0
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)
Пример #7
0
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')
Пример #8
0
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)
Пример #9
0
		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)
Пример #10
0
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)
Пример #11
0
		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)