本文整理汇总了Python中waflib.Logs.info方法的典型用法代码示例。如果您正苦于以下问题:Python Logs.info方法的具体用法?Python Logs.info怎么用?Python Logs.info使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类waflib.Logs
的用法示例。
在下文中一共展示了Logs.info方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: vlogcomp
# 需要导入模块: from waflib import Logs [as 别名]
# 或者: from waflib.Logs import info [as 别名]
def vlogcomp(self, project):
Logs.info("=> Running vlogcomp")
tool = self.tg.env.XILINX_VLOGCOMP
cmd = "%(tool)s -work isim_temp -intstyle ise -prj %(project)s" % locals()
self.ctx.exec_command(cmd, cwd=self.path.abspath())
示例2: _exec_doxygen
# 需要导入模块: from waflib import Logs [as 别名]
# 或者: from waflib.Logs import info [as 别名]
def _exec_doxygen(self, tgen, conf):
'''Generate source code documentation for the given task generator.'''
Logs.info("Generating documentation for '%s'" % tgen.name)
# open template configuration and read as string
name = self.env.DOXYGEN_CONFIG
if not os.path.exists(name):
name = '%s/doxy.config' % os.path.dirname(__file__)
f = open(name, 'r')
s = f.read()
f.close()
# write configuration key,value pairs into template string
for key,value in conf.items():
s = re.sub('%s\s+=.*' % key, '%s = %s' % (key, value), s)
# create base directory for storing reports
doxygen_path = self.env.DOXYGEN_OUTPUT
if not os.path.exists(doxygen_path):
os.makedirs(doxygen_path)
# write component configuration to file and doxygen on it
config = '%s/doxy-%s.config' % (doxygen_path, tgen.name)
f = open(config, 'w+')
f.write(s)
f.close()
cmd = '%s %s' % (Utils.to_list(self.env.DOXYGEN)[0], config)
self.cmd_and_log(cmd)
示例3: bibfile
# 需要导入模块: from waflib import Logs [as 别名]
# 或者: from waflib.Logs import info [as 别名]
def bibfile(self):
"""
Parses *.aux* files to find bibfiles to process.
If present, execute :py:meth:`waflib.Tools.tex.tex.bibtex_fun`
"""
for aux_node in self.aux_nodes:
try:
ct = aux_node.read()
except EnvironmentError:
Logs.error("Error reading %s: %r", aux_node.abspath())
continue
if g_bibtex_re.findall(ct):
Logs.info("calling bibtex")
self.env.env = {}
self.env.env.update(os.environ)
self.env.env.update({"BIBINPUTS": self.texinputs(), "BSTINPUTS": self.texinputs()})
self.env.SRCFILE = aux_node.name[:-4]
self.check_status("error when calling bibtex", self.bibtex_fun())
for node in getattr(self, "multibibs", []):
self.env.env = {}
self.env.env.update(os.environ)
self.env.env.update({"BIBINPUTS": self.texinputs(), "BSTINPUTS": self.texinputs()})
self.env.SRCFILE = node.name[:-4]
self.check_status("error when calling bibtex", self.bibtex_fun())
示例4: build
# 需要导入模块: from waflib import Logs [as 别名]
# 或者: from waflib.Logs import info [as 别名]
def build(bld):
msg.debug ('orch: BUILD CALLED')
bld.load(bld.env.orch_extra_tools)
# batteries-included
from . import features
features.load()
msg.debug('orch: available features: %s' % (', '.join(sorted(available_features.keys())), ))
msg.info('Supported waf features: "%s"' % '", "'.join(sorted(available_features.keys())))
msg.debug('orch: Build envs: %s' % ', '.join(sorted(bld.all_envs.keys())))
tobuild = bld.env.orch_group_packages
print 'TOBUILD',tobuild
for grpname, pkgnames in tobuild:
msg.debug('orch: Adding group: "%s"' % grpname)
bld.add_group(grpname)
for pkgname in pkgnames:
bld.worch_package(pkgname)
bld.add_pre_fun(pre_process)
bld.add_post_fun(post_process)
msg.debug ('orch: BUILD CALLED [done]')
示例5: execute_build
# 需要导入模块: from waflib import Logs [as 别名]
# 或者: from waflib.Logs import info [as 别名]
def execute_build(self):
"""
Execute the build by:
* reading the scripts (see :py:meth:`waflib.Context.Context.recurse`)
* calling :py:meth:`waflib.Build.BuildContext.pre_build` to call user build functions
* calling :py:meth:`waflib.Build.BuildContext.compile` to process the tasks
* calling :py:meth:`waflib.Build.BuildContext.post_build` to call user build functions
"""
#Logs.info("Waf: Entering directory `%s'", self.variant_dir)
self.recurse([self.run_dir])
self.pre_build()
# display the time elapsed in the progress bar
self.timer = Utils.Timer()
try:
self.compile()
finally:
if self.progress_bar == 1 and sys.stdout.isatty():
c = self.producer.processed or 1
m = self.progress_line(c, c, Logs.colors.BLUE, Logs.colors.NORMAL)
Logs.info(m, extra={'stream': sys.stdout, 'c1': Logs.colors.cursor_off, 'c2' : Logs.colors.cursor_on})
#Logs.info("Waf: Leaving directory `%s'", self.variant_dir)
try:
self.producer.bld = None
del self.producer
except AttributeError:
pass
self.post_build()
示例6: do_install
# 需要导入模块: from waflib import Logs [as 别名]
# 或者: from waflib.Logs import info [as 别名]
def do_install(self,src,tgt,chmod=Utils.O644):
d,_=os.path.split(tgt)
Utils.check_dir(d)
srclbl=src.replace(self.srcnode.abspath()+os.sep,'')
if not Options.options.force:
try:
st1=os.stat(tgt)
st2=os.stat(src)
except OSError:
pass
else:
if st1.st_mtime>=st2.st_mtime and st1.st_size==st2.st_size:
Logs.info('- install %s (from %s)'%(tgt,srclbl))
return False
Logs.info('+ install %s (from %s)'%(tgt,srclbl))
try:
os.remove(tgt)
except OSError:
pass
try:
shutil.copy2(src,tgt)
os.chmod(tgt,chmod)
except IOError:
try:
os.stat(src)
except(OSError,IOError):
Logs.error('File %r does not exist'%src)
raise Errors.WafError('Could not install the file %r'%tgt)
示例7: parse_options
# 需要导入模块: from waflib import Logs [as 别名]
# 或者: from waflib.Logs import info [as 别名]
def parse_options():
"""
Parse the command-line options and initialize the logging system.
Called by :py:func:`waflib.Scripting.waf_entry_point` during the initialization.
"""
Context.create_context('options').execute()
if not Options.commands:
Options.commands = [default_cmd]
Options.commands = [x for x in Options.commands if x != 'options'] # issue 1076
# process some internal Waf options
Logs.verbose = Options.options.verbose
Logs.init_log()
if Options.options.zones:
Logs.zones = Options.options.zones.split(',')
if not Logs.verbose:
Logs.verbose = 1
elif Logs.verbose > 0:
Logs.zones = ['runner']
if Logs.verbose > 2:
Logs.zones = ['*']
# Force console mode for SSH connections
if getattr(Options.options, 'console_mode', None):
if os.environ.get('SSH_CLIENT') != None or os.environ.get('SSH_TTY') != None:
Logs.info("[INFO] - SSH Connection detected. Forcing 'console_mode'")
Options.options.console_mode = str(True)
开发者ID:NightOwlsEntertainment,项目名称:PetBox_A_Journey_to_Conquer_Elementary_Algebra,代码行数:32,代码来源:Scripting.py
示例8: write_compilation_database
# 需要导入模块: from waflib import Logs [as 别名]
# 或者: from waflib.Logs import info [as 别名]
def write_compilation_database(ctx):
"Write the clang compilation database as JSON"
database_file = ctx.bldnode.make_node('compile_commands.json')
Logs.info('Build commands will be stored in %s', database_file.path_from(ctx.path))
try:
root = json.load(database_file)
except IOError:
root = []
clang_db = dict((x['file'], x) for x in root)
for task in getattr(ctx, 'clang_compilation_database_tasks', []):
try:
cmd = task.last_cmd
except AttributeError:
continue
directory = getattr(task, 'cwd', ctx.variant_dir)
f_node = task.inputs[0]
filename = os.path.relpath(f_node.abspath(), directory)
entry = {
"directory": directory,
"arguments": cmd,
"file": filename,
}
clang_db[filename] = entry
root = list(clang_db.values())
database_file.write(json.dumps(root, indent=2))
示例9: add_linux_launcher_script
# 需要导入模块: from waflib import Logs [as 别名]
# 或者: from waflib.Logs import info [as 别名]
def add_linux_launcher_script(self):
if not getattr(self, 'create_linux_launcher', False):
return
if self.env['PLATFORM'] == 'project_generator':
return
if not getattr(self, 'link_task', None):
self.bld.fatal('Linux Launcher is only supported for Executable Targets')
# Write to rc file if content is different
for node in self.bld.get_output_folders(self.bld.env['PLATFORM'], self.bld.env['CONFIGURATION']):
node.mkdir()
for project in self.bld.spec_game_projects():
# Set up values for linux launcher script template
linux_launcher_script_file = node.make_node('Launch_'+self.bld.get_executable_name(project)+'.sh')
self.to_launch_executable = self.bld.get_executable_name(project)
template = compile_template(LAUNCHER_SCRIPT)
linux_launcher_script_content = template(self)
if not os.path.exists(linux_launcher_script_file.abspath()) or linux_launcher_script_file.read() != linux_launcher_script_content:
Logs.info('Updating Linux Launcher Script (%s)' % linux_launcher_script_file.abspath() )
linux_launcher_script_file.write(linux_launcher_script_content)
开发者ID:NightOwlsEntertainment,项目名称:PetBox_A_Journey_to_Conquer_Elementary_Algebra,代码行数:29,代码来源:compile_settings_linux.py
示例10: execute_build
# 需要导入模块: from waflib import Logs [as 别名]
# 或者: from waflib.Logs import info [as 别名]
def execute_build(self):
"""
Execute the build by:
* reading the scripts (see :py:meth:`waflib.Context.Context.recurse`)
* calling :py:meth:`waflib.Build.BuildContext.pre_build` to call user build functions
* calling :py:meth:`waflib.Build.BuildContext.compile` to process the tasks
* calling :py:meth:`waflib.Build.BuildContext.post_build` to call user build functions
"""
if not self.is_option_true('internal_dont_check_recursive_execution'):
Logs.info("[WAF] Executing '%s' in '%s'" % (self.cmd, self.variant_dir) )
self.recurse([self.run_dir])
self.pre_build()
# display the time elapsed in the progress bar
self.timer = Utils.Timer()
if self.progress_bar:
sys.stderr.write(Logs.colors.cursor_off)
try:
self.compile()
finally:
if self.progress_bar == 1:
c = len(self.returned_tasks) or 1
self.to_log(self.progress_line(c, c, Logs.colors.BLUE, Logs.colors.NORMAL))
print('')
sys.stdout.flush()
sys.stderr.write(Logs.colors.cursor_on)
self.post_build()
示例11: do_display_project_uses
# 需要导入模块: from waflib import Logs [as 别名]
# 或者: from waflib.Logs import info [as 别名]
def do_display_project_uses(self, projname, depth=0):
projdeps = self.get_project_uses(projname)
msg.info('%s%s' % (' '*depth, projname))
for projdep in projdeps:
self.do_display_project_uses(projdep, depth+1)
pass
return
示例12: bibfile
# 需要导入模块: from waflib import Logs [as 别名]
# 或者: from waflib.Logs import info [as 别名]
def bibfile(self):
"""
Parse the *.aux* files to find bibfiles to process.
If yes, execute :py:meth:`waflib.Tools.tex.tex.bibtex_fun`
"""
for aux_node in self.aux_nodes:
try:
ct = aux_node.read()
except EnvironmentError:
Logs.error('Error reading %s: %r' % aux_node.abspath())
continue
if g_bibtex_re.findall(ct):
Logs.info('calling bibtex')
self.env.env = {}
self.env.env.update(os.environ)
self.env.env.update({'BIBINPUTS': self.texinputs(), 'BSTINPUTS': self.texinputs()})
self.env.SRCFILE = aux_node.name[:-4]
self.check_status('error when calling bibtex', self.bibtex_fun())
for node in getattr(self, 'multibibs', []):
self.env.env = {}
self.env.env.update(os.environ)
self.env.env.update({'BIBINPUTS': self.texinputs(), 'BSTINPUTS': self.texinputs()})
self.env.SRCFILE = node.name[:-4]
self.check_status('error when calling bibtex', self.bibtex_fun())
示例13: install_pyfile
# 需要导入模块: from waflib import Logs [as 别名]
# 或者: from waflib.Logs import info [as 别名]
def install_pyfile(self,node,install_from=None):
from_node=install_from or node.parent
tsk=self.bld.install_as(self.install_path+'/'+node.path_from(from_node),node,postpone=False)
path=tsk.get_install_path()
if self.bld.is_install<0:
Logs.info("+ removing byte compiled python files")
for x in'co':
try:
os.remove(path+x)
except OSError:
pass
if self.bld.is_install>0:
try:
st1=os.stat(path)
except OSError:
Logs.error('The python file is missing, this should not happen')
for x in['c','o']:
do_inst=self.env['PY'+x.upper()]
try:
st2=os.stat(path+x)
except OSError:
pass
else:
if st1.st_mtime<=st2.st_mtime:
do_inst=False
if do_inst:
lst=(x=='o')and[self.env['PYFLAGS_OPT']]or[]
(a,b,c)=(path,path+x,tsk.get_install_path(destdir=False)+x)
argv=self.env['PYTHON']+lst+['-c',INST,a,b,c]
Logs.info('+ byte compiling %r'%(path+x))
env=self.env.env or None
ret=Utils.subprocess.Popen(argv,env=env).wait()
if ret:
raise Errors.WafError('py%s compilation failed %r'%(x,path))
示例14: check_sparkle
# 需要导入模块: from waflib import Logs [as 别名]
# 或者: from waflib.Logs import info [as 别名]
def check_sparkle(self, *k, **kw):
try:
self.check_sparkle_base(*k, **kw)
except:
try:
# Try local path
# Logs.info("Check local version of Sparkle framework")
self.check_sparkle_base(cxxflags="-F%s/Frameworks/" % self.path.abspath(),
linkflags="-F%s/Frameworks/" % self.path.abspath())
except:
import urllib, subprocess, os, shutil
if not os.path.exists('osx/Frameworks/Sparkle.framework'):
# Download to local path and retry
Logs.info("Sparkle framework not found, trying to download it to 'build/'")
urllib.urlretrieve("https://github.com/sparkle-project/Sparkle/releases/download/1.7.1/Sparkle-1.7.1.zip", "build/Sparkle.zip")
if os.path.exists('build/Sparkle.zip'):
# try:
subprocess.check_call(['unzip', '-qq', 'build/Sparkle.zip', '-d', 'build/Sparkle'])
os.remove("build/Sparkle.zip")
if not os.path.exists("osx/Frameworks"):
os.mkdir("osx/Frameworks")
os.rename("build/Sparkle/Sparkle.framework", "osx/Frameworks/Sparkle.framework")
shutil.rmtree("build/Sparkle", ignore_errors=True)
self.check_sparkle_base(cxxflags="-F%s/Frameworks/" % self.path.abspath(),
linkflags="-F%s/Frameworks/" % self.path.abspath())
示例15: print_legend
# 需要导入模块: from waflib import Logs [as 别名]
# 或者: from waflib.Logs import info [as 别名]
def print_legend(self):
"""Displays description for the tree command."""
Logs.info("")
Logs.info("")
Logs.info("DESCRIPTION:")
Logs.info("m (lib) = uses system library 'm' (i.e. libm.so)")
Logs.info("")