Skip to content

Commit 61eda75

Browse files
authored
Merge pull request #4989 from pradyunsg/misc/better-pep-518-message
Improve message when setuptools is missing (PEP 518)
2 parents d6e050a + 398fea8 commit 61eda75

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/pip/_internal/operations/prepare.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -128,9 +128,13 @@ def prep_for_dist(self, finder, build_isolation):
128128

129129
if 'setuptools' not in build_requirements:
130130
logger.warning(
131-
"This version of pip does not implement PEP 516, so "
132-
"it cannot build a wheel without setuptools. You may need to "
133-
"upgrade to a newer version of pip.")
131+
"%s does not include 'setuptools' as a buildtime requirement "
132+
"in its pyproject.toml.", self.req.name,
133+
)
134+
logger.warning(
135+
"This version of pip does not implement PEP 517 so it cannot "
136+
"build a wheel without setuptools."
137+
)
134138

135139
if not should_isolate:
136140
self.req.build_env = NoOpBuildEnvironment(no_clean=False)

0 commit comments

Comments
 (0)