Skip to content

Commit

Permalink
Do not attempt setup.py clean for failed pep517 builds
Browse files Browse the repository at this point in the history
Fixes pypa#6642
  • Loading branch information
sbidoul committed Dec 13, 2019
1 parent b9bdad2 commit e0785e3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 2 additions & 0 deletions news/6642.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Do not attempt to run ``setup.py clean`` after a ``pep517`` build error,
since a ``setup.py`` may not exist in that case.
5 changes: 3 additions & 2 deletions src/pip/_internal/wheel_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -349,10 +349,11 @@ def _build_one_inside_env(
except Exception:
pass
# Ignore return, we can't do anything else useful.
self._clean_one(req)
if not req.use_pep517:
self._clean_one_legacy(req)
return None

def _clean_one(self, req):
def _clean_one_legacy(self, req):
# type: (InstallRequirement) -> bool
clean_args = make_setuptools_clean_args(
req.setup_py_path,
Expand Down

0 comments on commit e0785e3

Please sign in to comment.