def run(self): if len(self.sconscripts) < 1: # nothing to do, just leave it here. return check_numscons(minver=(0, 11, 0)) if self.package_list is not None: id = select_packages(self.pkg_names, self.package_list) sconscripts = [self.sconscripts[i] for i in id] pre_hooks = [self.pre_hooks[i] for i in id] post_hooks = [self.post_hooks[i] for i in id] pkg_names = [self.pkg_names[i] for i in id] pkg_paths = [self.pkg_paths[i] for i in id] else: sconscripts = self.sconscripts pre_hooks = self.pre_hooks post_hooks = self.post_hooks pkg_names = self.pkg_names pkg_paths = self.pkg_paths if is_bootstrapping(): bootstrapping = 1 else: bootstrapping = 0 scons_exec = get_python_exec_invoc() scons_exec += ' ' + protect_path( pjoin(get_scons_local_path(), 'scons.py')) for sconscript, pre_hook, post_hook, pkg_name, pkg_path in zip( sconscripts, pre_hooks, post_hooks, pkg_names, pkg_paths): if pre_hook: pre_hook() if sconscript: self._call_scons(scons_exec, sconscript, pkg_name, pkg_path, bootstrapping) if post_hook: post_hook(**{'pkg_name': pkg_name, 'scons_cmd': self})
def run(self): if len(self.sconscripts) < 1: # nothing to do, just leave it here. return check_numscons(minver=(0, 11, 0)) if self.package_list is not None: id = select_packages(self.pkg_names, self.package_list) sconscripts = [self.sconscripts[i] for i in id] pre_hooks = [self.pre_hooks[i] for i in id] post_hooks = [self.post_hooks[i] for i in id] pkg_names = [self.pkg_names[i] for i in id] pkg_paths = [self.pkg_paths[i] for i in id] else: sconscripts = self.sconscripts pre_hooks = self.pre_hooks post_hooks = self.post_hooks pkg_names = self.pkg_names pkg_paths = self.pkg_paths if is_bootstrapping(): bootstrapping = 1 else: bootstrapping = 0 scons_exec = get_python_exec_invoc() scons_exec += ' ' + protect_path(pjoin(get_scons_local_path(), 'scons.py')) for sconscript, pre_hook, post_hook, pkg_name, pkg_path in zip(sconscripts, pre_hooks, post_hooks, pkg_names, pkg_paths): if pre_hook: pre_hook() if sconscript: self._call_scons(scons_exec, sconscript, pkg_name, pkg_path, bootstrapping) if post_hook: post_hook(**{'pkg_name': pkg_name, 'scons_cmd' : self})
scons_exec = get_python_exec_invoc() scons_exec += ' ' + protect_path(pjoin(get_scons_local_path(), 'scons.py')) if self.package_list is not None: id = select_packages(self.pkg_names, self.package_list) sconscripts = [self.sconscripts[i] for i in id] pre_hooks = [self.pre_hooks[i] for i in id] post_hooks = [self.post_hooks[i] for i in id] pkg_names = [self.pkg_names[i] for i in id] else: sconscripts = self.sconscripts pre_hooks = self.pre_hooks post_hooks = self.post_hooks pkg_names = self.pkg_names if is_bootstrapping(): bootstrap = 1 else: bootstrap = 0 for sconscript, pre_hook, post_hook, pkg_name in zip(sconscripts, pre_hooks, post_hooks, pkg_names): if pre_hook: pre_hook() if sconscript: cmd = [scons_exec, "-f", sconscript, '-I.'] if self.jobs: cmd.append(" --jobs=%d" % int(self.jobs)) if self.inplace:
scons_exec += ' ' + protect_path( pjoin(get_scons_local_path(), 'scons.py')) if self.package_list is not None: id = select_packages(self.pkg_names, self.package_list) sconscripts = [self.sconscripts[i] for i in id] pre_hooks = [self.pre_hooks[i] for i in id] post_hooks = [self.post_hooks[i] for i in id] pkg_names = [self.pkg_names[i] for i in id] else: sconscripts = self.sconscripts pre_hooks = self.pre_hooks post_hooks = self.post_hooks pkg_names = self.pkg_names if is_bootstrapping(): bootstrap = 1 else: bootstrap = 0 for sconscript, pre_hook, post_hook, pkg_name in zip( sconscripts, pre_hooks, post_hooks, pkg_names): if pre_hook: pre_hook() if sconscript: cmd = [scons_exec, "-f", sconscript, '-I.'] if self.jobs: cmd.append(" --jobs=%d" % int(self.jobs)) if self.inplace: cmd.append("inplace=1")