Skip to content

Commit 74999cc

Browse files
committed
Mention pyproject.toml instead of PEP 517 in build log
1 parent e5be3f7 commit 74999cc

File tree

4 files changed

+14
-8
lines changed

4 files changed

+14
-8
lines changed

src/pip/_internal/commands/install.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -367,22 +367,22 @@ def run(self, options: Values, args: List[str]) -> int:
367367
global_options=[],
368368
)
369369

370-
# If we're using PEP 517, we cannot do a direct install
370+
# If we're using PEP 517, we cannot do a legacy setup.py install
371371
# so we fail here.
372372
pep517_build_failure_names: List[str] = [
373373
r.name for r in build_failures if r.use_pep517 # type: ignore
374374
]
375375
if pep517_build_failure_names:
376376
raise InstallationError(
377-
"Could not build wheels for {} which use"
378-
" PEP 517 and cannot be installed directly".format(
377+
"Could not build wheels for {}, which is required to "
378+
"install pyproject.toml-based projects".format(
379379
", ".join(pep517_build_failure_names)
380380
)
381381
)
382382

383383
# For now, we just warn about failures building legacy
384-
# requirements, as we'll fall through to a direct
385-
# install for those.
384+
# requirements, as we'll fall through to a setup.py install for
385+
# those.
386386
for r in build_failures:
387387
if not r.use_pep517:
388388
r.legacy_install_reason = 8368

src/pip/_internal/operations/build/metadata.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,9 @@ def generate_metadata(build_env: BuildEnvironment, backend: Pep517HookCaller) ->
2323
# Note that Pep517HookCaller implements a fallback for
2424
# prepare_metadata_for_build_wheel, so we don't have to
2525
# consider the possibility that this hook doesn't exist.
26-
runner = runner_with_spinner_message("Preparing wheel metadata")
26+
runner = runner_with_spinner_message(
27+
"Preparing wheel metadata (pyproject.toml)"
28+
)
2729
with backend.subprocess_runner(runner):
2830
distinfo_dir = backend.prepare_metadata_for_build_wheel(metadata_dir)
2931

src/pip/_internal/operations/build/metadata_editable.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,9 @@ def generate_editable_metadata(
2525
# Note that Pep517HookCaller implements a fallback for
2626
# prepare_metadata_for_build_wheel/editable, so we don't have to
2727
# consider the possibility that this hook doesn't exist.
28-
runner = runner_with_spinner_message("Preparing editable metadata")
28+
runner = runner_with_spinner_message(
29+
"Preparing editable metadata (pyproject.toml)"
30+
)
2931
with backend.subprocess_runner(runner):
3032
distinfo_dir = backend.prepare_metadata_for_build_editable(metadata_dir)
3133

src/pip/_internal/operations/build/wheel.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,9 @@ def build_wheel_pep517(
2323
try:
2424
logger.debug("Destination directory: %s", tempd)
2525

26-
runner = runner_with_spinner_message(f"Building wheel for {name} (PEP 517)")
26+
runner = runner_with_spinner_message(
27+
f"Building wheel for {name} (pyproject.toml)"
28+
)
2729
with backend.subprocess_runner(runner):
2830
wheel_name = backend.build_wheel(
2931
tempd,

0 commit comments

Comments
 (0)