Skip to content

Commit 43485f5

Browse files
authored
Merge pull request #8617 from pradyunsg/drop-final-20.2-deprecation
Reject setup.py projects that don't generate .egg-info
2 parents 50aca38 + d34b099 commit 43485f5

File tree

3 files changed

+9
-19
lines changed

3 files changed

+9
-19
lines changed

news/6998.removal

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Deprecate setup.py-based builds that do not generate an ``.egg-info`` directory.

news/8617.removal

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Deprecate setup.py-based builds that do not generate an ``.egg-info`` directory.

src/pip/_internal/operations/install/legacy.py

+7-19
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import sys
77
from distutils.util import change_root
88

9-
from pip._internal.utils.deprecation import deprecated
9+
from pip._internal.exceptions import InstallationError
1010
from pip._internal.utils.logging import indent_log
1111
from pip._internal.utils.misc import ensure_dir
1212
from pip._internal.utils.setuptools_build import make_setuptools_install_args
@@ -106,24 +106,12 @@ def prepend_root(path):
106106
egg_info_dir = prepend_root(directory)
107107
break
108108
else:
109-
deprecated(
110-
reason=(
111-
"{} did not indicate that it installed an "
112-
".egg-info directory. Only setup.py projects "
113-
"generating .egg-info directories are supported."
114-
).format(req_description),
115-
replacement=(
116-
"for maintainers: updating the setup.py of {0}. "
117-
"For users: contact the maintainers of {0} to let "
118-
"them know to update their setup.py.".format(
119-
req_name
120-
)
121-
),
122-
gone_in="20.2",
123-
issue=6998,
124-
)
125-
# FIXME: put the record somewhere
126-
return True
109+
message = (
110+
"{} did not indicate that it installed an "
111+
".egg-info directory. Only setup.py projects "
112+
"generating .egg-info directories are supported."
113+
).format(req_description)
114+
raise InstallationError(message)
127115

128116
new_lines = []
129117
for line in record_lines:

0 commit comments

Comments
 (0)