File tree Expand file tree Collapse file tree 2 files changed +20
-7
lines changed Expand file tree Collapse file tree 2 files changed +20
-7
lines changed Original file line number Diff line number Diff line change @@ -124,8 +124,8 @@ class LegacyInstallReason:
124
124
def __init__ (
125
125
self ,
126
126
reason : str ,
127
- replacement : Optional [str ],
128
- gone_in : Optional [str ],
127
+ replacement : Optional [str ] = None ,
128
+ gone_in : Optional [str ] = None ,
129
129
feature_flag : Optional [str ] = None ,
130
130
issue : Optional [int ] = None ,
131
131
emit_after_success : bool = False ,
@@ -173,3 +173,16 @@ def emit_deprecation(self, name: str) -> None:
173
173
issue = 8559 ,
174
174
emit_before_install = True ,
175
175
)
176
+
177
+ LegacyInstallReasonNoBinaryForcesSetuptoolsInstall = LegacyInstallReason (
178
+ reason = (
179
+ "{name} is being installed using the legacy "
180
+ "'setup.py install' method, because the '--no-binary' option was enabled "
181
+ "for it and this currently disables local wheel building for projects that "
182
+ "don't have a 'pyproject.toml' file."
183
+ ),
184
+ replacement = "to enable the '--use-pep517' option" ,
185
+ gone_in = None ,
186
+ issue = 11451 ,
187
+ emit_before_install = True ,
188
+ )
Original file line number Diff line number Diff line change 19
19
from pip ._internal .operations .build .wheel_editable import build_wheel_editable
20
20
from pip ._internal .operations .build .wheel_legacy import build_wheel_legacy
21
21
from pip ._internal .req .req_install import InstallRequirement
22
- from pip ._internal .utils .deprecation import LegacyInstallReasonMissingWheelPackage
22
+ from pip ._internal .utils .deprecation import (
23
+ LegacyInstallReasonMissingWheelPackage ,
24
+ LegacyInstallReasonNoBinaryForcesSetuptoolsInstall ,
25
+ )
23
26
from pip ._internal .utils .logging import indent_log
24
27
from pip ._internal .utils .misc import ensure_dir , hash_file , is_wheel_installed
25
28
from pip ._internal .utils .setuptools_build import make_setuptools_clean_args
@@ -80,10 +83,7 @@ def _should_build(
80
83
81
84
assert check_bdist_wheel is not None
82
85
if not check_bdist_wheel (req ):
83
- logger .info (
84
- "Skipping wheel build for %s, due to binaries being disabled for it." ,
85
- req .name ,
86
- )
86
+ req .legacy_install_reason = LegacyInstallReasonNoBinaryForcesSetuptoolsInstall
87
87
return False
88
88
89
89
if not is_wheel_installed ():
You can’t perform that action at this time.
0 commit comments