Skip to content

Commit

Permalink
Deprecate install fallback when bdist_wheel fails
Browse files Browse the repository at this point in the history
  • Loading branch information
sbidoul committed May 31, 2020
1 parent d01bfcf commit d10c69f
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 3 deletions.
2 changes: 2 additions & 0 deletions news/8368.removal
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Deprecate legacy setup.py install when building a wheel failed for source
distributions without pyproject.toml
23 changes: 20 additions & 3 deletions src/pip/_internal/commands/install.py
Original file line number Diff line number Diff line change
Expand Up @@ -359,9 +359,6 @@ def run(self, options, args):

# If we're using PEP 517, we cannot do a direct install
# so we fail here.
# We don't care about failures building legacy
# requirements, as we'll fall through to a direct
# install for those.
pep517_build_failures = [
r for r in build_failures if r.use_pep517
]
Expand All @@ -371,6 +368,26 @@ def run(self, options, args):
" PEP 517 and cannot be installed directly".format(
", ".join(r.name for r in pep517_build_failures)))

# 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:
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)
)
),
replacement="to fix the wheel build issue reported above",
gone_in="20.3",
issue=8368,
)

to_install = resolver.get_installation_order(
requirement_set
)
Expand Down

0 comments on commit d10c69f

Please sign in to comment.