Skip to content

Commit fc5c308

Browse files
committed
Deprecate setup.py install and easy_install. Ref #917.
1 parent 18b997d commit fc5c308

File tree

4 files changed

+18
-0
lines changed

4 files changed

+18
-0
lines changed

changelog.d/917.change.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
``setup.py install`` and ``easy_install`` commands are now officially deprecated. Use other standards-based installers (like pip) and builders (like build). Workloads reliant on this behavior should pin to this major version of Setuptools.

pytest.ini

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,7 @@ filterwarnings=
2929

3030
# https://github.com/pypa/setuptools/issues/2823
3131
ignore:setup_requires is deprecated.
32+
33+
# https://github.com/pypa/setuptools/issues/917
34+
ignore:setup.py install is deprecated.
35+
ignore:easy_install command is deprecated.

setuptools/command/easy_install.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,12 @@ class easy_install(Command):
153153
create_index = PackageIndex
154154

155155
def initialize_options(self):
156+
warnings.warn(
157+
"easy_install command is deprecated. "
158+
"Use build and pip and other standards-based tools.",
159+
EasyInstallDeprecationWarning,
160+
)
161+
156162
# the --user option seems to be an opt-in one,
157163
# so the default should be False.
158164
self.user = 0

setuptools/command/install.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,13 @@ class install(orig.install):
3030
_nc = dict(new_commands)
3131

3232
def initialize_options(self):
33+
34+
warnings.warn(
35+
"setup.py install is deprecated. "
36+
"Use build and pip and other standards-based tools.",
37+
setuptools.SetuptoolsDeprecationWarning,
38+
)
39+
3340
orig.install.initialize_options(self)
3441
self.old_and_unmanageable = None
3542
self.single_version_externally_managed = None

0 commit comments

Comments
 (0)