def build_source_packages(self, names): deps = [d for d in names if d in self.specs] platform = self.settings.platform outdated = self.outdated_names(deps) # fail_str: keep ordering of names fail_str = (' '.join([s for s in deps if s in outdated ]).replace(misc.with_platform('', platform), '')) if not fail_str: fail_str = '<nothing to be done>.' gub_log.default_logger.write_log( 'must rebuild[%(platform)s]: %(fail_str)s\n' % locals(), 'stage') if self.options.dry_run: sys.exit(0) outdated_installed = [ x for x in list(reversed(outdated)) if self.is_installed_spec(x) ] if outdated_installed: platform = self.settings.platform outdated_str = (' '.join(outdated_installed).replace( misc.with_platform('', platform), '')) gub_log.default_logger.write_log( 'removing outdated[%(platform)s]: %(outdated_str)s\n' % locals(), 'stage') self.uninstall_specs(outdated_installed) global target for spec_name in deps: target = spec_name self.spec_build(spec_name) logger = gub_log.default_logger target = None
def build_source_packages (self, names): deps = [d for d in names if d in self.specs] platform = self.settings.platform outdated = self.outdated_names (deps) # fail_str: keep ordering of names fail_str = (' '.join ([s for s in deps if s in outdated ]) .replace (misc.with_platform ('', platform), '')) if not fail_str: fail_str = '<nothing to be done>.' gub_log.default_logger.write_log ('must rebuild[%(platform)s]: %(fail_str)s\n' % locals (), 'stage') if self.options.dry_run: sys.exit (0) outdated_installed = [x for x in list (reversed (outdated)) if self.is_installed_spec (x)] if outdated_installed: platform = self.settings.platform outdated_str = (' '.join (outdated_installed) .replace (misc.with_platform ('', platform), '')) gub_log.default_logger.write_log ('removing outdated[%(platform)s]: %(outdated_str)s\n' % locals (), 'stage') self.uninstall_specs (outdated_installed) global target for spec_name in deps: target = spec_name self.spec_build (spec_name) logger = gub_log.default_logger target = None
def url (self): if not self._url: self._url = self.build_class ().source if not self._url: logging.warning ('no source specified in class: ' + self.build_class ().__name__ + '\n') if not self._url: self._url = self.settings.dependency_url (self.name ()) if not self._url: raise Exception ('No URL for: ' + misc.with_platform (self._name, self.settings.platform)) if type (self._url) == str: try: self._url = self._url % self.settings.__dict__ except: printf ('URL:', self._url) raise x, parameters = misc.dissect_url (self._url) if parameters.get ('patch'): self._cls.patches = parameters['patch'] if parameters.get ('dependency'): self._cls.build_dependencies = parameters['dependency'] return self._url
def with_platform (self, name): return misc.with_platform (name, self.settings.platform)
def __init__(self, settings, source): lilypond.LilyPond.__init__(self, settings, source) self.dependencies += [misc.with_platform("lilypond-doc", self.settings.build_platform)]
def get_build_dependencies (settings): mod = get_cross_module (settings) return bootstrap_names + [misc.with_platform (n, settings.platform) for n in mod.get_cross_build_dependencies (settings)]
def with_platform(self, name): return misc.with_platform(name, self.settings.platform)
def with_platform(s, platform=settings.platform): return misc.with_platform(s, platform)
def with_platform (s, platform=settings.platform): return misc.with_platform (s, platform)
def platform_name (self): return misc.with_platform ('%(split_name)s' % self._dict, self.platform ())
def get_build_dependencies(settings): mod = get_cross_module(settings) return bootstrap_names + [ misc.with_platform(n, settings.platform) for n in mod.get_cross_build_dependencies(settings) ]
def __init__(self, settings, source): lilypond.LilyPond.__init__(self, settings, source) self.dependencies += [ misc.with_platform('lilypond-doc', self.settings.build_platform) ]
def platform_name(self): return misc.with_platform('%(split_name)s' % self._dict, self.platform())