def load(root):
    """
    Given a source directory (root) of a package,
    return an importlib.metadata.Distribution object
    with metadata build from that package.
    """
    root = os.path.expanduser(root)
    system = compat_system(root)
    builder = functools.partial(build, source_dir=root, system=system)
    path = Path(build_as_zip(builder))
    return imp_meta.PathDistribution(path)

    Given a source directory (root) of a package,
    return an importlib.metadata.Distribution object
    with metadata build from that package.
    
product/gradle-plugin/src/main/python/pip/_vendor/pep517/meta.py