def detect_envlist(ini):
    """Default envlist automatically based on the Travis environment."""
    # Find the envs that tox knows about
    declared_envs = get_declared_envs(ini)

    # Find all the envs for all the desired factors given
    desired_factors = get_desired_factors(ini)

    # Reduce desired factors
    desired_envs = ['-'.join(env) for env in product(*desired_factors)]

    # Find matching envs
    return match_envs(declared_envs, desired_envs,
                      passthru=len(desired_factors) == 1)
Default envlist automatically based on the Travis environment.