@classmethod
def parse(cls, src, distname=None):
    """
        pasted from pkg_resources, fall back on their EntryPoints when extras are required
        """
    match = cls.pattern.match(src)
    res = match.groupdict()
    if res['extras']:
        import pkg_resources as pr
        dist = pr.get_distribution(distname) if distname else None
        return pr.EntryPoint.parse(src, dist=dist)
    attrs = res['attr'].split('.') if res['attr'] else ()
    return cls(res['name'], res['module'], attrs, distname)
