def _get_info_from_urls(self, urls):
    if ('bdist_wheel' in urls):
        wheels = urls['bdist_wheel']
        universal_wheel = None
        universal_python2_wheel = None
        universal_python3_wheel = None
        platform_specific_wheels = []
        for wheel in wheels:
            link = Link(wheel)
            m = wheel_file_re.match(link.filename)
            if (not m):
                continue
            pyver = m.group('pyver')
            abi = m.group('abi')
            plat = m.group('plat')
            if ((abi == 'none') and (plat == 'any')):
                if (pyver == 'py2.py3'):
                    universal_wheel = wheel
                elif (pyver == 'py2'):
                    universal_python2_wheel = wheel
                else:
                    universal_python3_wheel = wheel
            else:
                platform_specific_wheels.append(wheel)
        if (universal_wheel is not None):
            return self._get_info_from_wheel(universal_wheel)
        info = None
        if (universal_python2_wheel and universal_python3_wheel):
            info = self._get_info_from_wheel(universal_python2_wheel)
            py3_info = self._get_info_from_wheel(universal_python3_wheel)
            if py3_info.requires_dist:
                if (not info.requires_dist):
                    info.requires_dist = py3_info.requires_dist
                    return info
                py2_requires_dist = set((dependency_from_pep_508(r).to_pep_508() for r in info.requires_dist))
                py3_requires_dist = set((dependency_from_pep_508(r).to_pep_508() for r in py3_info.requires_dist))
                base_requires_dist = (py2_requires_dist & py3_requires_dist)
                py2_only_requires_dist = (py2_requires_dist - py3_requires_dist)
                py3_only_requires_dist = (py3_requires_dist - py2_requires_dist)
                requires_dist = list(base_requires_dist)
                for requirement in py2_only_requires_dist:
                    dep = dependency_from_pep_508(requirement)
                    dep.marker = dep.marker.intersect(parse_marker("python_version == '2.7'"))
                    requires_dist.append(dep.to_pep_508())
                for requirement in py3_only_requires_dist:
                    dep = dependency_from_pep_508(requirement)
                    dep.marker = dep.marker.intersect(parse_marker("python_version >= '3'"))
                    requires_dist.append(dep.to_pep_508())
                info.requires_dist = sorted(list(set(requires_dist)))
        if info:
            return info
        if universal_python3_wheel:
            return self._get_info_from_wheel(universal_python3_wheel)
        if universal_python2_wheel:
            return self._get_info_from_wheel(universal_python2_wheel)
        if (platform_specific_wheels and ('sdist' not in urls)):
            return self._get_info_from_wheel(platform_specific_wheels[0])
    return self._get_info_from_sdist(urls['sdist'][0])
def _get_info_from_urls(self, urls):
    if ('bdist_wheel' in urls):
        wheels = urls['bdist_wheel']
        universal_wheel = None
        universal_python2_wheel = None
        universal_python3_wheel = None
        platform_specific_wheels = []
        for wheel in wheels:
            link = Link(wheel)
            m = wheel_file_re.match(link.filename)
            if (not m):
                continue
            pyver = m.group('pyver')
            abi = m.group('abi')
            plat = m.group('plat')
            if ((abi == 'none') and (plat == 'any')):
                if (pyver == 'py2.py3'):
                    universal_wheel = wheel
                elif (pyver == 'py2'):
                    universal_python2_wheel = wheel
                else:
                    universal_python3_wheel = wheel
            else:
                platform_specific_wheels.append(wheel)
        if (universal_wheel is not None):
            return self._get_info_from_wheel(universal_wheel)
        info = None
        if (universal_python2_wheel and universal_python3_wheel):
            info = self._get_info_from_wheel(universal_python2_wheel)
            py3_info = self._get_info_from_wheel(universal_python3_wheel)
            if py3_info.requires_dist:
                if (not info.requires_dist):
                    info.requires_dist = py3_info.requires_dist
                    return info
                py2_requires_dist = set((dependency_from_pep_508(r).to_pep_508() for r in info.requires_dist))
                py3_requires_dist = set((dependency_from_pep_508(r).to_pep_508() for r in py3_info.requires_dist))
                base_requires_dist = (py2_requires_dist & py3_requires_dist)
                py2_only_requires_dist = (py2_requires_dist - py3_requires_dist)
                py3_only_requires_dist = (py3_requires_dist - py2_requires_dist)
                requires_dist = list(base_requires_dist)
                for requirement in py2_only_requires_dist:
                    dep = dependency_from_pep_508(requirement)
                    dep.marker = dep.marker.intersect(parse_marker("python_version == '2.7'"))
                    requires_dist.append(dep.to_pep_508())
                for requirement in py3_only_requires_dist:
                    dep = dependency_from_pep_508(requirement)
                    dep.marker = dep.marker.intersect(parse_marker("python_version >= '3'"))
                    requires_dist.append(dep.to_pep_508())
                info.requires_dist = sorted(list(set(requires_dist)))
        if info:
            return info
        if universal_python3_wheel:
            return self._get_info_from_wheel(universal_python3_wheel)
        if universal_python2_wheel:
            return self._get_info_from_wheel(universal_python2_wheel)
        if (platform_specific_wheels and ('sdist' not in urls)):
            return self._get_info_from_wheel(platform_specific_wheels[0])
    return self._get_info_from_sdist(urls['sdist'][0])