Skip to content

Commit

Permalink
Deprecate legacy install when --no-binary is used
Browse files Browse the repository at this point in the history
  • Loading branch information
sbidoul committed Apr 2, 2021
1 parent 46c2547 commit a4144fe
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
12 changes: 12 additions & 0 deletions src/pip/_internal/req/req_install.py
Original file line number Diff line number Diff line change
Expand Up @@ -794,6 +794,18 @@ def install(
self.install_succeeded = True
return

if self.legacy_install_reason == 81020: # TODO issue id
deprecated(
reason=(
"Installing {} using the legacy 'setup.py install' "
"method, due to binaries being disabled for it.".
format(self.name)
),
replacement="--use-feature=always-install-via-wheel",
gone_in=None,
issue=81020, # TODO issue id
)

# TODO: Why don't we do this for editable installs?

# Extend the list of global and install options passed on to
Expand Down
5 changes: 1 addition & 4 deletions src/pip/_internal/wheel_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,7 @@ def _should_build(
return True

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

if not is_wheel_installed():
Expand Down

0 comments on commit a4144fe

Please sign in to comment.