Skip to content

Commit 4566569

Browse files
authored
Merge pull request #4970 from pypa/bugfix/3143-simple-install
In deprecated setup.py install, fall back to distutils.
2 parents 76b041d + 7fc5e05 commit 4566569

File tree

3 files changed

+3
-19
lines changed

3 files changed

+3
-19
lines changed

newsfragments/+99b1cfb7.feature.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Added a deadline of Oct 31 to the setup.py install deprecation.

newsfragments/3143.bugfix.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
With ``setup.py install --prefix=...``, fall back to distutils install rather than failing. Note that running ``setup.py install`` is deprecated.

setuptools/command/install.py

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,7 @@ def initialize_options(self):
6363
standards-based tools.
6464
""",
6565
see_url="https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html",
66-
# TODO: Document how to bootstrap setuptools without install
67-
# (e.g. by unzipping the wheel file)
68-
# and then add a due_date to this warning.
66+
due_date=(2025, 10, 31),
6967
)
7068

7169
super().initialize_options()
@@ -93,19 +91,6 @@ def handle_extra_path(self):
9391
self.extra_dirs = ''
9492
return None
9593

96-
def run(self):
97-
# Explicit request for old-style install? Just do it
98-
if self.old_and_unmanageable or self.single_version_externally_managed:
99-
return super().run()
100-
101-
if not self._called_from_setup(inspect.currentframe()):
102-
# Run in backward-compatibility mode to support bdist_* commands.
103-
super().run()
104-
else:
105-
self.do_egg_install()
106-
107-
return None
108-
10994
@staticmethod
11095
def _called_from_setup(run_frame):
11196
"""
@@ -139,9 +124,6 @@ def _called_from_setup(run_frame):
139124

140125
return False
141126

142-
def do_egg_install(self) -> None:
143-
raise NotImplementedError("Support for egg-based install has been removed.")
144-
145127

146128
# XXX Python 3.1 doesn't see _nc if this is inside the class
147129
install.sub_commands = [

0 commit comments

Comments
 (0)