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 5, 2022
1 parent 31657e7 commit 0d3721b
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions src/poetry/inspection/info.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit 0d3721b

Please sign in to comment.