def variant_string_to_dict(var_string):
    """
    Returns a dictionary of variants based on the versions within the variant string.
    """
    variants = var_string.split("-")
    variant_dict = { 'python' : variants[0][2:],
                     'build_type' : variants[1],
                     'mpi_type' : variants[2],
                     'cudatoolkit' : variants[3] }

    return variant_dict