Skip to content

Commit

Permalink
Deprecate setup.py install and easy_install. Ref #917.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaraco committed Oct 22, 2021
1 parent 18b997d commit fc5c308
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 0 deletions.
1 change: 1 addition & 0 deletions changelog.d/917.change.rst
Original file line number Diff line number Diff line change
@@ -0,0 +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.
4 changes: 4 additions & 0 deletions pytest.ini
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,7 @@ filterwarnings=

# https://github.com/pypa/setuptools/issues/2823
ignore:setup_requires is deprecated.

# https://github.com/pypa/setuptools/issues/917
ignore:setup.py install is deprecated.
ignore:easy_install command is deprecated.
6 changes: 6 additions & 0 deletions setuptools/command/easy_install.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,12 @@ class easy_install(Command):
create_index = PackageIndex

def initialize_options(self):
warnings.warn(
"easy_install command is deprecated. "
"Use build and pip and other standards-based tools.",
EasyInstallDeprecationWarning,
)

# the --user option seems to be an opt-in one,
# so the default should be False.
self.user = 0
Expand Down
7 changes: 7 additions & 0 deletions setuptools/command/install.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,13 @@ class install(orig.install):
_nc = dict(new_commands)

def initialize_options(self):

warnings.warn(
"setup.py install is deprecated. "
"Use build and pip and other standards-based tools.",
setuptools.SetuptoolsDeprecationWarning,
)

orig.install.initialize_options(self)
self.old_and_unmanageable = None
self.single_version_externally_managed = None
Expand Down

0 comments on commit fc5c308

Please sign in to comment.