def create_feed(target_feed, local_iface_path, archive_file, archive_name, main): shutil.copyfile(local_iface_path, target_feed) support.publish(target_feed, set_main = main, archive_url = support.get_archive_url(options, status.release_version, os.path.basename(archive_file)), archive_file = archive_file, archive_extract = archive_name)
def __init__(self, options, src_feed_name, release_version): self.src_feed_name = src_feed_name self.src_feed = support.load_feed(src_feed_name) self.archive_dir_public_url = support.get_archive_url( options, release_version, '') self.config = ConfigParser.RawConfigParser() # Start with a default configuration self.config.add_section('global') self.config.set('global', 'builders', 'host') self.config.add_section('builder-host') #self.config.set('builder-host', 'build', '0launch --not-before 0.10 http://0install.net/2007/interfaces/0release.xml --build-slave "$@"') self.config.set('builder-host', 'build', '') self.src_impl = support.get_singleton_impl(self.src_feed) if self.src_impl.arch and self.src_impl.arch.endswith('-src'): path = basedir.load_first_config('0install.net', '0release', 'builders.conf') if path: info("Loading configuration file '%s'", path) self.config.read(path) else: info( "No builders.conf configuration; will build a binary for this host only" ) if options.builders is not None: builders = options.builders else: builders = self.config.get('global', 'builders').strip() if builders: self.targets = [x.strip() for x in builders.split(',')] info("%d build targets configured: %s", len(self.targets), self.targets) else: self.targets = [] info("No builders set; no binaries will be built") else: self.targets = []
def __init__(self, options, src_feed_name, release_version): self.src_feed_name = src_feed_name self.src_feed = support.load_feed(src_feed_name) self.archive_dir_public_url = support.get_archive_url(options, release_version, '') self.config = ConfigParser.RawConfigParser() # Start with a default configuration self.config.add_section('global') self.config.set('global', 'builders', 'host') self.config.add_section('builder-host') #self.config.set('builder-host', 'build', '0launch --not-before 0.10 http://0install.net/2007/interfaces/0release.xml --build-slave "$@"') self.config.set('builder-host', 'build', '') self.src_impl = support.get_singleton_impl(self.src_feed) if self.src_impl.arch and self.src_impl.arch.endswith('-src'): path = basedir.load_first_config('0install.net', '0release', 'builders.conf') if path: info("Loading configuration file '%s'", path) self.config.read(path) else: info("No builders.conf configuration; will build a binary for this host only") if options.builders is not None: builders = options.builders else: builders = self.config.get('global', 'builders').strip() if builders: self.targets = [x.strip() for x in builders.split(',')] info("%d build targets configured: %s", len(self.targets), self.targets) else: self.targets = [] info("No builders set; no binaries will be built") else: self.targets = []
def url(archive): return support.get_archive_url(options, status.release_version, archive)