Splits the given package name and returns a tuple (name, ver).

def split_package_name(p):
    """Splits the given package name and returns a tuple (name, ver)."""
    s = p.split(six.u('=='))
    if len(s) == 1:
        return (to_text(s[0]), None)
    else:
        return (to_text(s[0]), to_text(s[1]))