Skip to content

Commit d10c69f

Browse files
committed
Deprecate install fallback when bdist_wheel fails
1 parent d01bfcf commit d10c69f

File tree

2 files changed

+22
-3
lines changed

2 files changed

+22
-3
lines changed

news/8368.removal

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Deprecate legacy setup.py install when building a wheel failed for source
2+
distributions without pyproject.toml

src/pip/_internal/commands/install.py

+20-3
Original file line numberDiff line numberDiff line change
@@ -359,9 +359,6 @@ def run(self, options, args):
359359

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

371+
# For now, we just warn about failures building legacy
372+
# requirements, as we'll fall through to a direct
373+
# install for those.
374+
legacy_build_failures = [
375+
r for r in build_failures if not r.use_pep517
376+
]
377+
if legacy_build_failures:
378+
deprecated(
379+
reason=(
380+
"Could not build wheels for {} which do not use "
381+
"PEP 517. pip will fall back to legacy setup.py "
382+
"install for these.".format(
383+
", ".join(r.name for r in legacy_build_failures)
384+
)
385+
),
386+
replacement="to fix the wheel build issue reported above",
387+
gone_in="20.3",
388+
issue=8368,
389+
)
390+
374391
to_install = resolver.get_installation_order(
375392
requirement_set
376393
)

0 commit comments

Comments
 (0)