Skip to content

Commit

Permalink
Merge pull request #8617 from pradyunsg/drop-final-20.2-deprecation
Browse files Browse the repository at this point in the history
Reject setup.py projects that don't generate .egg-info
  • Loading branch information
pradyunsg authored Jul 24, 2020
2 parents 50aca38 + d34b099 commit 43485f5
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 19 deletions.
1 change: 1 addition & 0 deletions news/6998.removal
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Deprecate setup.py-based builds that do not generate an ``.egg-info`` directory.
1 change: 1 addition & 0 deletions news/8617.removal
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Deprecate setup.py-based builds that do not generate an ``.egg-info`` directory.
26 changes: 7 additions & 19 deletions src/pip/_internal/operations/install/legacy.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import sys
from distutils.util import change_root

from pip._internal.utils.deprecation import deprecated
from pip._internal.exceptions import InstallationError
from pip._internal.utils.logging import indent_log
from pip._internal.utils.misc import ensure_dir
from pip._internal.utils.setuptools_build import make_setuptools_install_args
Expand Down Expand Up @@ -106,24 +106,12 @@ def prepend_root(path):
egg_info_dir = prepend_root(directory)
break
else:
deprecated(
reason=(
"{} did not indicate that it installed an "
".egg-info directory. Only setup.py projects "
"generating .egg-info directories are supported."
).format(req_description),
replacement=(
"for maintainers: updating the setup.py of {0}. "
"For users: contact the maintainers of {0} to let "
"them know to update their setup.py.".format(
req_name
)
),
gone_in="20.2",
issue=6998,
)
# FIXME: put the record somewhere
return True
message = (
"{} did not indicate that it installed an "
".egg-info directory. Only setup.py projects "
"generating .egg-info directories are supported."
).format(req_description)
raise InstallationError(message)

new_lines = []
for line in record_lines:
Expand Down

0 comments on commit 43485f5

Please sign in to comment.