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 Jan 1, 2020
1 parent acd499c commit 9dbe8df
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 @@ -231,11 +231,12 @@ def _build_one_inside_env(
req.name, e,
)
# Ignore return, we can't do anything else useful.
_clean_one(req, global_options)
if not req.use_pep517:
_clean_one_legacy(req, global_options)
return None


def _clean_one(req, global_options):
def _clean_one_legacy(req, global_options):
# type: (InstallRequirement, List[str]) -> bool
clean_args = make_setuptools_clean_args(
req.setup_py_path,
Expand Down

0 comments on commit 9dbe8df

Please sign in to comment.