diff --git a/src/poetry/inspection/info.py b/src/poetry/inspection/info.py index 7d754c0bb6f..dd40eb0592c 100644 --- a/src/poetry/inspection/info.py +++ b/src/poetry/inspection/info.py @@ -34,15 +34,23 @@ logger = logging.getLogger(__name__) PEP517_META_BUILD = """\ -import pep517.build -import pep517.meta +from build import ProjectBuilder +from build.env import IsolatedEnvBuilder -path='{source}' -system=pep517.build.compat_system(path) -pep517.meta.build(source_dir=path, dest='{dest}', system=system) +path = '{source}' +out_dir = '{dest}' + +builder = ProjectBuilder(path) + +with IsolatedEnvBuilder() as env: + builder.python_executable = env.executable + builder.scripts_dir = env.scripts_dir + env.install(builder.build_system_requires) + env.install(builder.get_requires_for_build('wheel')) + builder.metadata_path(out_dir) """ -PEP517_META_BUILD_DEPS = ["pep517===0.8.2", "toml==0.10.1"] +PEP517_META_BUILD_DEPS = ["build===0.7.0"] class PackageInfoError(ValueError):