def parse_hdf5_version(vers):
    """ Split HDF5 version string X.Y.Z into a tuple.  ValueError on failure.
    """

    try:
        vers = tuple(int(x) for x in vers.split('.'))
        if len(vers) != 3:
            raise ValueError
    except Exception:
        raise ValueError("Illegal value for HDF5 version")

    return vers