'Ensure that \'option\' is a list of strings.  If \'option\' is
currently a string, we split it either on /,\s*/ or /\s+/, so
"foo bar baz", "foo,bar,baz", and "foo,   bar baz" all become
["foo", "bar", "baz"].'

def ensure_string_list(self, option):

    val = getattr(self, option)
    if (val is None):
        return
    elif isinstance(val, str):
        setattr(self, option, re.split(',\\s*|\\s+', val))
    else:
        if isinstance(val, list):
            ok = 1
            for element in val:
                if (not isinstance(element, str)):
                    ok = 0
                    break
        else:
            ok = 0
        if (not ok):
            raise DistutilsOptionError, ("'%s'    must    be    a    list    of    strings    (got    %r)" % (option, val))
