def define_version_constraints(self):
    'Define what version_satisfies(...) means in ASP logic.'
    for (pkg_name, versions) in sorted(self.version_constraints):
        allowed_versions = [v for v in sorted(self.possible_versions[pkg_name]) if v.satisfies(versions)]
        exact_match = [v for v in allowed_versions if (v == versions)]
        if exact_match:
            allowed_versions = exact_match
        for v in allowed_versions:
            self.gen.fact(fn.version_satisfies(pkg_name, versions, v))
        self.gen.newline()
Define what version_satisfies(...) means in ASP logic.
def define_version_constraints(self):
    
    for (pkg_name, versions) in sorted(self.version_constraints):
        allowed_versions = [v for v in sorted(self.possible_versions[pkg_name]) if v.satisfies(versions)]
        exact_match = [v for v in allowed_versions if (v == versions)]
        if exact_match:
            allowed_versions = exact_match
        for v in allowed_versions:
            self.gen.fact(fn.version_satisfies(pkg_name, versions, v))
        self.gen.newline()