Пример #1
0
    def start(self):
        # Use a common prefix for the build tools for all the configurations
        # so that it can be reused
        config = Config()
        os.environ.clear()
        os.environ.update(self.config._pre_environ)
        config.prefix = self.config.build_tools_prefix
        config.load()
        config.build_tools_prefix = self.config.build_tools_prefix
        config.sources = self.config.build_tools_sources
        config.build_tools_sources = self.config.build_tools_sources
        config.cache_file = self.config.build_tools_cache
        config.build_tools_cache = self.config.build_tools_cache
        config.external_recipes = self.config.external_recipes
        config.home_dir = self.config.home_dir
        config.local_sources = self.config.local_sources
        # We use a different repo to prevent clashes between the same recipe
        # compiled with different prefixes
        config.binary_repo = self.config.binary_repo + '/build-tools'
        config.binary_repo_username = self.config.binary_repo_username
        config.binary_repo_password = self.config.binary_repo_password
        config.cache_url = self.config.cache_url

        if not os.path.exists(config.prefix):
            os.makedirs(config.prefix)
        if not os.path.exists(config.sources):
            os.makedirs(config.sources)

        config.do_setup_env()
        cookbook = CookBook(config)
        recipes = self.BUILD_TOOLS
        recipes += self.PLAT_BUILD_TOOLS.get(self.config.platform, [])
        oven = Oven(cookbook)
        ordered_recipes = cookbook.list_recipes_deps(recipes)
        oven.start_cooking(ordered_recipes, self.use_binaries,
                           self.upload_binaries, self.build_missing)
        self.config.do_setup_env()
Пример #2
0
    def start(self):
        # Use a common prefix for the build tools for all the configurations
        # so that it can be reused
        config = Config()
        os.environ.clear()
        os.environ.update(self.config._pre_environ)
        config.prefix = self.config.build_tools_prefix
        config.load()
        config.build_tools_prefix = self.config.build_tools_prefix
        config.sources = self.config.build_tools_sources
        config.build_tools_sources = self.config.build_tools_sources
        config.cache_file = self.config.build_tools_cache
        config.build_tools_cache = self.config.build_tools_cache
        config.external_recipes = self.config.external_recipes
        config.home_dir = self.config.home_dir
        config.local_sources = self.config.local_sources
        # We use a different repo to prevent clashes between the same recipe
        # compiled with different prefixes
        config.binary_repo = self.config.binary_repo + '/build-tools'
        config.binary_repo_username = self.config.binary_repo_username
        config.binary_repo_password = self.config.binary_repo_password
        config.cache_url = self.config.cache_url

        if not os.path.exists(config.prefix):
            os.makedirs(config.prefix)
        if not os.path.exists(config.sources):
            os.makedirs(config.sources)

        config.do_setup_env()
        cookbook = CookBook(config)
        recipes = self.BUILD_TOOLS
        recipes += self.PLAT_BUILD_TOOLS.get(self.config.platform, [])
        oven = Oven(cookbook)
        ordered_recipes = cookbook.list_recipes_deps(recipes)
        oven.start_cooking(ordered_recipes, self.use_binaries,
                self.upload_binaries, self.build_missing)
        self.config.do_setup_env()