Skip to content

Commit

Permalink
Give mypy some love after rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
sbidoul committed Jul 18, 2020
1 parent fe56826 commit d924b16
Showing 1 changed file with 14 additions and 11 deletions.
25 changes: 14 additions & 11 deletions src/pip/_internal/commands/install.py
Original file line number Diff line number Diff line change
Expand Up @@ -356,29 +356,32 @@ def run(self, options, args):

# If we're using PEP 517, we cannot do a direct install
# so we fail here.
pep517_build_failures = [
r for r in build_failures if r.use_pep517
]
if pep517_build_failures:
pep517_build_failure_names = [
r.name # type: ignore
for r in build_failures if r.use_pep517
] # type: List[str]
if pep517_build_failure_names:
raise InstallationError(
"Could not build wheels for {} which use"
" PEP 517 and cannot be installed directly".format(
", ".join(r.name # type: ignore
for r in pep517_build_failures)))
", ".join(pep517_build_failure_names)
)
)

# For now, we just warn about failures building legacy
# requirements, as we'll fall through to a direct
# install for those.
legacy_build_failures = [
r for r in build_failures if not r.use_pep517
]
if legacy_build_failures:
legacy_build_failure_names = [
r.name # type: ignore
for r in build_failures if not r.use_pep517
] # type: List[str]
if legacy_build_failure_names:
deprecated(
reason=(
"Could not build wheels for {} which do not use "
"PEP 517. pip will fall back to legacy 'setup.py "
"install' for these.".format(
", ".join(r.name for r in legacy_build_failures)
", ".join(legacy_build_failure_names)
)
),
replacement="to fix the wheel build issue reported above",
Expand Down

0 comments on commit d924b16

Please sign in to comment.