예제 #1
0
파일: buildrunner.py 프로젝트: marnen/gub
 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
예제 #2
0
 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
예제 #3
0
 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
예제 #4
0
파일: build.py 프로젝트: PhilHolmes/gub
 def with_platform (self, name):
     return misc.with_platform (name, self.settings.platform)
예제 #5
0
파일: lilypond.py 프로젝트: imace/gub
 def __init__(self, settings, source):
     lilypond.LilyPond.__init__(self, settings, source)
     self.dependencies += [misc.with_platform("lilypond-doc", self.settings.build_platform)]
예제 #6
0
파일: cross.py 프로젝트: cneira/gub
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)]
예제 #7
0
파일: build.py 프로젝트: marnen/gub
 def with_platform(self, name):
     return misc.with_platform(name, self.settings.platform)
예제 #8
0
파일: gup.py 프로젝트: jbenham2015/gub
 def with_platform(s, platform=settings.platform):
     return misc.with_platform(s, platform)
예제 #9
0
파일: gup.py 프로젝트: alepharchives/gub
 def with_platform (s, platform=settings.platform):
     return misc.with_platform (s, platform)
예제 #10
0
 def platform_name (self):
     return misc.with_platform ('%(split_name)s' % self._dict, self.platform ())
예제 #11
0
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)
    ]
예제 #12
0
파일: lilypond.py 프로젝트: marnen/gub
 def __init__(self, settings, source):
     lilypond.LilyPond.__init__(self, settings, source)
     self.dependencies += [
         misc.with_platform('lilypond-doc', self.settings.build_platform)
     ]
예제 #13
0
파일: guppackage.py 프로젝트: marnen/gub
 def platform_name(self):
     return misc.with_platform('%(split_name)s' % self._dict,
                               self.platform())