예제 #1
0
 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)
예제 #2
0
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) == []
예제 #3
0
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) == []
예제 #4
0
 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)