def find_packages(self, dependency):
    '\n        Find packages on the remote server.\n        '
    constraint = dependency.constraint
    if (constraint is None):
        constraint = '*'
    if (not isinstance(constraint, VersionConstraint)):
        constraint = parse_constraint(constraint)
    allow_prereleases = dependency.allows_prereleases()
    if isinstance(constraint, VersionRange):
        if (((constraint.max is not None) and constraint.max.is_prerelease()) or ((constraint.min is not None) and constraint.min.is_prerelease())):
            allow_prereleases = True
    try:
        info = self.get_package_info(dependency.name)
    except PackageNotFound:
        self._log('No packages found for {} {}'.format(dependency.name, str(constraint)), level='debug')
        return []
    packages = []
    ignored_pre_release_packages = []
    for (version, release) in info['releases'].items():
        if (not release):
            self._log('No release information found for {}-{}, skipping'.format(dependency.name, version), level='debug')
            continue
        try:
            package = Package(info['info']['name'], version)
        except ParseVersionError:
            self._log('Unable to parse version "{}" for the {} package, skipping'.format(version, dependency.name), level='debug')
            continue
        if (package.is_prerelease() and (not allow_prereleases)):
            if constraint.is_any():
                ignored_pre_release_packages.append(package)
            continue
        if ((not constraint) or (constraint and constraint.allows(package.version))):
            packages.append(package)
    self._log('{} packages found for {} {}'.format(len(packages), dependency.name, str(constraint)), level='debug')
    return (packages or ignored_pre_release_packages)
Find packages on the remote server.
def find_packages(self, dependency):
    '\n        \n        '
    constraint = dependency.constraint
    if (constraint is None):
        constraint = '*'
    if (not isinstance(constraint, VersionConstraint)):
        constraint = parse_constraint(constraint)
    allow_prereleases = dependency.allows_prereleases()
    if isinstance(constraint, VersionRange):
        if (((constraint.max is not None) and constraint.max.is_prerelease()) or ((constraint.min is not None) and constraint.min.is_prerelease())):
            allow_prereleases = True
    try:
        info = self.get_package_info(dependency.name)
    except PackageNotFound:
        self._log('No packages found for {} {}'.format(dependency.name, str(constraint)), level='debug')
        return []
    packages = []
    ignored_pre_release_packages = []
    for (version, release) in info['releases'].items():
        if (not release):
            self._log('No release information found for {}-{}, skipping'.format(dependency.name, version), level='debug')
            continue
        try:
            package = Package(info['info']['name'], version)
        except ParseVersionError:
            self._log('Unable to parse version "{}" for the {} package, skipping'.format(version, dependency.name), level='debug')
            continue
        if (package.is_prerelease() and (not allow_prereleases)):
            if constraint.is_any():
                ignored_pre_release_packages.append(package)
            continue
        if ((not constraint) or (constraint and constraint.allows(package.version))):
            packages.append(package)
    self._log('{} packages found for {} {}'.format(len(packages), dependency.name, str(constraint)), level='debug')
    return (packages or ignored_pre_release_packages)