21
21
from pip ._internal .operations .check import check_install_conflicts
22
22
from pip ._internal .req import install_given_reqs
23
23
from pip ._internal .req .req_tracker import get_requirement_tracker
24
+ from pip ._internal .utils .deprecation import deprecated
24
25
from pip ._internal .utils .distutils_args import parse_distutils_args
25
26
from pip ._internal .utils .filesystem import test_writable_dir
26
27
from pip ._internal .utils .misc import (
@@ -355,9 +356,6 @@ def run(self, options, args):
355
356
356
357
# If we're using PEP 517, we cannot do a direct install
357
358
# so we fail here.
358
- # We don't care about failures building legacy
359
- # requirements, as we'll fall through to a direct
360
- # install for those.
361
359
pep517_build_failures = [
362
360
r for r in build_failures if r .use_pep517
363
361
]
@@ -368,6 +366,26 @@ def run(self, options, args):
368
366
", " .join (r .name # type: ignore
369
367
for r in pep517_build_failures )))
370
368
369
+ # For now, we just warn about failures building legacy
370
+ # requirements, as we'll fall through to a direct
371
+ # install for those.
372
+ legacy_build_failures = [
373
+ r for r in build_failures if not r .use_pep517
374
+ ]
375
+ if legacy_build_failures :
376
+ deprecated (
377
+ reason = (
378
+ "Could not build wheels for {} which do not use "
379
+ "PEP 517. pip will fall back to legacy setup.py "
380
+ "install for these." .format (
381
+ ", " .join (r .name for r in legacy_build_failures )
382
+ )
383
+ ),
384
+ replacement = "to fix the wheel build issue reported above" ,
385
+ gone_in = "21.0" ,
386
+ issue = 8368 ,
387
+ )
388
+
371
389
to_install = resolver .get_installation_order (
372
390
requirement_set
373
391
)
0 commit comments