Skip to content

Commit

Permalink
replace deprecated pep517.build by build
Browse files Browse the repository at this point in the history
  • Loading branch information
finswimmer committed Feb 27, 2022
1 parent 31657e7 commit 16f2608
Showing 1 changed file with 18 additions and 7 deletions.
25 changes: 18 additions & 7 deletions src/poetry/inspection/info.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,26 @@
logger = logging.getLogger(__name__)

PEP517_META_BUILD = """\
import pep517.build
import pep517.meta
path='{source}'
system=pep517.build.compat_system(path)
pep517.meta.build(source_dir=path, dest='{dest}', system=system)
import build
import build.env
import pep517
source = '{source}'
dest = '{dest}'
with build.env.IsolatedEnvBuilder() as env:
builder = build.ProjectBuilder(
srcdir=source,
scripts_dir=env.scripts_dir,
python_executable=env.executable,
runner=pep517.quiet_subprocess_runner,
)
env.install(builder.build_system_requires)
env.install(builder.get_requires_for_build('wheel'))
builder.metadata_path(dest)
"""

PEP517_META_BUILD_DEPS = ["pep517===0.8.2", "toml==0.10.1"]
PEP517_META_BUILD_DEPS = ["build===0.7.0", "pep517==0.12.0"]


class PackageInfoError(ValueError):
Expand Down

0 comments on commit 16f2608

Please sign in to comment.