Skip to content

Disable easy_install command and remove sandbox functionality. #2908

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 15 commits into from
Apr 27, 2025
Merged
Show file tree
Hide file tree
Changes from 9 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 newsfragments/2908.removal.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Removed support for the easy_install command including the sandbox module.
22 changes: 3 additions & 19 deletions setuptools/command/easy_install.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,8 @@
)
from setuptools import Command
from setuptools.archive_util import unpack_archive
from setuptools.command import bdist_egg, egg_info, setopt
from setuptools.command import bdist_egg, setopt
from setuptools.package_index import URL_SCHEME, PackageIndex, parse_requirement_arg
from setuptools.sandbox import run_setup
from setuptools.warnings import SetuptoolsDeprecationWarning, SetuptoolsWarning
from setuptools.wheel import Wheel

Expand Down Expand Up @@ -1175,23 +1174,8 @@ def report_editable(self, spec, setup_script):
python = sys.executable
return '\n' + self.__editable_msg % locals()

def run_setup(self, setup_script, setup_base, args) -> None:
sys.modules.setdefault('distutils.command.bdist_egg', bdist_egg)
sys.modules.setdefault('distutils.command.egg_info', egg_info)

args = list(args)
if self.verbose > 2:
v = 'v' * (self.verbose - 1)
args.insert(0, '-' + v)
elif self.verbose < 2:
args.insert(0, '-q')
if self.dry_run:
args.insert(0, '-n')
log.info("Running %s %s", setup_script[len(setup_base) + 1 :], ' '.join(args))
try:
run_setup(setup_script, args)
except SystemExit as v:
raise DistutilsError(f"Setup script exited with {v.args[0]}") from v
def run_setup(self, setup_script, setup_base, args):
raise NotImplementedError("easy_install support has been removed")

def build_and_install(self, setup_script, setup_base):
args = ['bdist_egg', '--dist-dir']
Expand Down
Loading
Loading