def _get_distributions(self, resolver_options_builder): eggs = self.target.get("eggs").splitlines() resolvables = [ Resolvable.get(e, resolver_options_builder) for e in eggs ] resolver = Resolver() return resolver.resolve(resolvables)
def test_resolver_with_constraint(): builder = ResolverOptionsBuilder() r = Resolver() rs = _ResolvableSet() constraint = ResolvableRequirement.from_string('foo', builder) constraint.is_constraint = True package = SourcePackage.from_href('foo-2.3.4.tar.gz') rq = ResolvableRequirement.from_string('foo', builder) rs.merge(constraint, [package]) rs.merge(rq, [package]) assert r.resolve([], resolvable_set=rs) == []
def _get_distributions(self, resolver_options_builder): eggs = self.target.get("eggs").splitlines() resolvables = [Resolvable.get(e, resolver_options_builder) for e in eggs] resolver = Resolver() return resolver.resolve(resolvables)