def _parse_file(file):
    """ parse a single file entry
    """
    sfile = file.split(':')
    if len(sfile) == 1:
        path, type = file, ''
    elif len(sfile) == 2:
        path, type = sfile
    elif len(sfile) == 3:
        basename, path, type = sfile
    else:
        raise ValueError('unknown `file` format: ' + repr(file))
    return path
