Skip to content

Reject setup.py projects that don't generate .egg-info #8617

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 24, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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