Skip to content

Commit b5c483a

Browse files
committed
metadata: remove Distribution._local
Importing an external module is anti-pattern and very unexpected behavior. Furthermore, the specific builder implementation we are using will provision an isolated virtual environmnent and perform the build there, which is unwanted in various scenarious. Perhaps there was a time this helper was needed, but we can now remove this in favor of build.util.project_wheel_metadata[1]. [1] https://github.com/pypa/build/blob/82051d509a87124a46f3766134c11fc8aee9b86a/src/build/util.py#L27 Signed-off-by: Filipe Laíns <lains@riseup.net>
1 parent df5e617 commit b5c483a

1 file changed

Lines changed: 0 additions & 12 deletions

File tree

importlib_metadata/__init__.py

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -576,18 +576,6 @@ def _discover_resolvers():
576576
)
577577
return filter(None, declared)
578578

579-
@classmethod
580-
def _local(cls, root='.'):
581-
from pep517 import build, meta
582-
583-
system = build.compat_system(root)
584-
builder = functools.partial(
585-
meta.build,
586-
source_dir=root,
587-
system=system,
588-
)
589-
return PathDistribution(zipp.Path(meta.build_as_zip(builder)))
590-
591579
@property
592580
def metadata(self) -> _meta.PackageMetadata:
593581
"""Return the parsed metadata for this Distribution.

0 commit comments

Comments
 (0)