Skip to content

Commit 9dbe8df

Browse files
committed
Do not attempt setup.py clean for failed pep517 builds
Fixes pypa#6642
1 parent acd499c commit 9dbe8df

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

news/6642.bugfix

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Do not attempt to run ``setup.py clean`` after a ``pep517`` build error,
2+
since a ``setup.py`` may not exist in that case.

src/pip/_internal/wheel_builder.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -231,11 +231,12 @@ def _build_one_inside_env(
231231
req.name, e,
232232
)
233233
# Ignore return, we can't do anything else useful.
234-
_clean_one(req, global_options)
234+
if not req.use_pep517:
235+
_clean_one_legacy(req, global_options)
235236
return None
236237

237238

238-
def _clean_one(req, global_options):
239+
def _clean_one_legacy(req, global_options):
239240
# type: (InstallRequirement, List[str]) -> bool
240241
clean_args = make_setuptools_clean_args(
241242
req.setup_py_path,

0 commit comments

Comments
 (0)