def post_compile(self): # Do the output_registry -> installed sections registry convertion section_writer = self.section_writer for category, name, nodes, from_node, target_dir in self.outputs_registry.iter_over_category(): installed_category = self.outputs_registry.installed_categories[category] if installed_category in section_writer.sections: sections = section_writer.sections[installed_category] else: sections = section_writer.sections[installed_category] = {} registrer = self.isection_registry.registrer(category, name) sections[name] = registrer(installed_category, name, nodes, from_node, target_dir) # FIXME: this is quite stupid. if self.inplace: scheme = _compute_scheme(self.package_options) scheme["prefix"] = scheme["eprefix"] = self.run_node.abspath() scheme["sitedir"] = self.run_node.abspath() def _install_node(category, node, from_node, target_dir): installed_path = subst_vars(target_dir, scheme) target = os.path.join(installed_path, node.path_from(from_node)) copy_installer(node.srcpath(), target, category) intree = (self.top_node == self.run_node) if intree: for category, name, nodes, from_node, target_dir in self.outputs_registry.iter_over_category(): for node in nodes: if node.is_bld(): _install_node(category, node, from_node, target_dir) else: for category, name, nodes, from_node, target_dir in self.outputs_registry.iter_over_category(): for node in nodes: _install_node(category, node, from_node, target_dir)
def _compute_scheme(self, bento_info, options): package_options = PackageOptions.from_string(bento_info) pkg = PackageDescription.from_string(bento_info) scheme = _compute_scheme(package_options) set_scheme_win32(scheme, options, pkg) return scheme
def retrieve_configured_scheme(self, command_argv=None): """Return the configured path scheme with the given command argv. Note ---- This can only be safely called once regiser_options_context has been called for the configure command""" assert self._package_options is not None assert self.is_options_context_registered("configure") if command_argv is None: command_argv = [] scheme = _compute_scheme(self._package_options) options_context = self.retrieve_options_context("configure") o, a = options_context.parser.parse_args(command_argv) set_scheme_options(scheme, o, self._package_options) return scheme
def retrieve_scheme(self): """Return the path scheme, including any custom path defined in the bento.info script (Path sections).""" return _compute_scheme(self._package_options)