def _get_default_setuptools_abi(platform_string, pyver):
    """ Try to guess the ABI for setuptools eggs from the platform_string
    and pyver parts.

    Parameters
    ----------
    platform_string: str
        The platform part of the setuptools egg filename as a string. If
        None, understood as a cross platform egg (pure python).
    pyver: str
        The python version
    """
    assert pyver in ('2.6', '2.7')
    if platform_string is None:
        return None
    elif platform_string.startswith('linux') or platform_string.startswith(
        'win') or platform_string.startswith('macosx'):
        return 'cp{0}{1}m'.format(pyver[0], pyver[2])
    else:
        msg = 'Platform string {0!r} not supported'.format(platform_string)
        raise ValueError(msg)
