def solve(pool, requirement, installed_repository, policy): solver = Solver(pool, installed_repository, policy) return solver.solve(requirement)
def compute_decisions(self): solver = Solver(self.pool, self.installed_repository) decisions, rules = solver._prepare_solver(self.request) solver._make_assertion_rules_decisions(decisions, rules) return decisions
def _create_solver(self, installed_packages, remote_packages): installed_repo = Repository(installed_packages) remote_repo = Repository(remote_packages) pool = Pool([installed_repo, remote_repo]) return Solver(pool, installed_repo)
def from_yaml(cls, filename): base_scenario = BaseScenario.from_yaml(filename) solver = Solver(base_scenario.pool, base_scenario.installed_repository) return cls(_base_scenario=base_scenario, solver=solver)