@classmethod
def split_project(cls, name):
    """
        Split a directory name into project, core-version, version and patches.

        Patches should be separated from the main project string and one another
        using a '+'.
        """
    p = name.split('+')
    name, extras = p[0], tuple(p[1:])
    match = cls.package_pattern.fullmatch(name)
    if match:
        return match.group(1), match.group(2), match.group(3), extras
    raise ValueError('Not a valid package string: "{}"'.format(name))
