<commit_before># Copyright (C) 2009, <NAME>
# See the README file for details, or visit http://0install.net.

import tempfile, shutil, subprocess, os
import ConfigParser
from logging import info
from zeroinstall.injector import model
from zeroinstall.support import basedir

import support

COMPILE = 'http://0install.net/2006/interfaces/0compile.xml'

class Compiler:
	def __init__(self, options, src_feed_name):
		self.src_feed_name = src_feed_name
		self.src_feed = support.load_feed(src_feed_name)
		self.archive_dir_public_url = options.archive_dir_public_url
		assert options.archive_dir_public_url

		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.9 http://0install.net/2007/interfaces/0release.xml --build-slave')

		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()<commit_msg>Requrie 0release >= 0.10 on the build slave<commit_after># Copyright (C) 2009, <NAME>
# See the README file for details, or visit http://0install.net.

import tempfile, shutil, subprocess, os
import ConfigParser
from logging import info
from zeroinstall.injector import model
from zeroinstall.support import basedir

import support

COMPILE = 'http://0install.net/2006/interfaces/0compile.xml'

class Compiler:
	def __init__(self, options, src_feed_name):
		self.src_feed_name = src_feed_name
		self.src_feed = support.load_feed(src_feed_name)
		self.archive_dir_public_url = options.archive_dir_public_url
		assert options.archive_dir_public_url

		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.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()
{'fraction_non_alphanumeric': 0.11840796019900497, 'fraction_numerical': 0.01625207296849088, 'mean_word_length': 4.8111753371868975, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 6, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 4}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5055958', 'n_tokens_mistral': 1075, 'n_tokens_neox': 962, 'n_words': 227}