Skip to content

Commit 9d761d4

Browse files
committed
Deprecate legacy install when --no-binary is used
1 parent 8978322 commit 9d761d4

File tree

2 files changed

+13
-4
lines changed

2 files changed

+13
-4
lines changed

src/pip/_internal/req/req_install.py

+12
Original file line numberDiff line numberDiff line change
@@ -822,6 +822,18 @@ def install(
822822
self.install_succeeded = True
823823
return
824824

825+
if self.legacy_install_reason == 81020: # TODO issue id
826+
deprecated(
827+
reason=(
828+
"Installing {} using the legacy 'setup.py install' "
829+
"method, due to binaries being disabled for it.".
830+
format(self.name)
831+
),
832+
replacement="--use-feature=always-install-via-wheel",
833+
gone_in=None,
834+
issue=81020, # TODO issue id
835+
)
836+
825837
# TODO: Why don't we do this for editable installs?
826838

827839
# Extend the list of global and install options passed on to

src/pip/_internal/wheel_builder.py

+1-4
Original file line numberDiff line numberDiff line change
@@ -72,10 +72,7 @@ def _should_build(
7272
return True
7373

7474
if not check_binary_allowed(req):
75-
logger.info(
76-
"Using legacy 'setup.py install' for %s, due to binaries "
77-
"being disabled for it.", req.name,
78-
)
75+
req.legacy_install_reason = 81020 # TODO issue id
7976
return False
8077

8178
if not is_wheel_installed():

0 commit comments

Comments
 (0)