Skip to content

Commit e0785e3

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

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
@@ -349,10 +349,11 @@ def _build_one_inside_env(
349349
except Exception:
350350
pass
351351
# Ignore return, we can't do anything else useful.
352-
self._clean_one(req)
352+
if not req.use_pep517:
353+
self._clean_one_legacy(req)
353354
return None
354355

355-
def _clean_one(self, req):
356+
def _clean_one_legacy(self, req):
356357
# type: (InstallRequirement) -> bool
357358
clean_args = make_setuptools_clean_args(
358359
req.setup_py_path,

0 commit comments

Comments
 (0)