MCPcopy Create free account
hub / github.com/audacity/audacity / execute

Function execute

lib-src/lv2/lv2/waflib/Scripting.py:569–611  ·  view source on GitHub ↗

Wraps :py:func:`waflib.Context.Context.execute` on the context class

(self)

Source from the content-addressed store, hash-verified

567 Decorator that enables context commands to run *configure* as needed.
568 """
569 def execute(self):
570 """
571 Wraps :py:func:`waflib.Context.Context.execute` on the context class
572 """
573 if not Configure.autoconfig:
574 return execute_method(self)
575
576 env = ConfigSet.ConfigSet()
577 do_config = False
578 try:
579 env.load(os.path.join(Context.top_dir, Options.lockfile))
580 except EnvironmentError:
581 Logs.warn('Configuring the project')
582 do_config = True
583 else:
584 if env.run_dir != Context.run_dir:
585 do_config = True
586 else:
587 h = 0
588 for f in env.files:
589 try:
590 h = Utils.h_list((h, Utils.readf(f, 'rb')))
591 except EnvironmentError:
592 do_config = True
593 break
594 else:
595 do_config = h != env.hash
596
597 if do_config:
598 cmd = env.config_cmd or 'configure'
599 if Configure.autoconfig == 'clobber':
600 tmp = Options.options.__dict__
601 if env.options:
602 Options.options.__dict__ = env.options
603 try:
604 run_command(cmd)
605 finally:
606 Options.options.__dict__ = tmp
607 else:
608 run_command(cmd)
609 run_command(self.cmd)
610 else:
611 return execute_method(self)
612 return execute
613Build.BuildContext.execute = autoconfigure(Build.BuildContext.execute)
614

Callers 5

executeMethod · 0.50
loopMethod · 0.50
executeMethod · 0.50
reorderMethod · 0.50
fftFunction · 0.50

Calls 2

loadMethod · 0.95
run_commandFunction · 0.70

Tested by

no test coverage detected