1
1
Fork 0
mirror of https://github.com/pypa/pip synced 2023-12-13 21:30:23 +01:00

Do not attempt setup.py clean for failed pep517 builds

Fixes #6642
This commit is contained in:
Stéphane Bidoul (ACSONE) 2019-12-13 22:33:11 +01:00
parent c93acfb20b
commit 8d1d20de8c
No known key found for this signature in database
GPG key ID: BCAB2555446B5B92
2 changed files with 5 additions and 2 deletions

2
news/6642.bugfix Normal file
View file

@ -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.

View file

@ -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,