Skip to content

Commit

Permalink
Consider success flag instead of absence of exception
Browse files Browse the repository at this point in the history
  • Loading branch information
sbidoul committed Aug 13, 2020
1 parent 03d49da commit 4c348cf
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions src/pip/_internal/req/req_install.py
Original file line number Diff line number Diff line change
Expand Up @@ -860,21 +860,21 @@ def install(
except Exception:
self.install_succeeded = True
raise
else:
if self.legacy_install_reason == 8368:
deprecated(
reason=(
"{} was installed using the legacy 'setup.py install' "
"method, because a wheel could not be built for it.".
format(self.name)
),
replacement="to fix the wheel build issue reported above",
gone_in="21.0",
issue=8368,
)

self.install_succeeded = success

if success and self.legacy_install_reason == 8368:
deprecated(
reason=(
"{} was installed using the legacy 'setup.py install' "
"method, because a wheel could not be built for it.".
format(self.name)
),
replacement="to fix the wheel build issue reported above",
gone_in="21.0",
issue=8368,
)


def check_invalid_constraint_type(req):
# type: (InstallRequirement) -> str
Expand Down

0 comments on commit 4c348cf

Please sign in to comment.