easy_install.py 780 B

123456789101112131415161718192021222324252627282930
  1. import os
  2. import sys
  3. import types
  4. from setuptools import Command
  5. from .. import _scripts, warnings
  6. class easy_install(Command):
  7. """Stubbed command for temporary pbr compatibility."""
  8. def __getattr__(name):
  9. attr = getattr(
  10. types.SimpleNamespace(
  11. ScriptWriter=_scripts.ScriptWriter,
  12. sys_executable=os.environ.get(
  13. "__PYVENV_LAUNCHER__", os.path.normpath(sys.executable)
  14. ),
  15. ),
  16. name,
  17. )
  18. warnings.SetuptoolsDeprecationWarning.emit(
  19. summary="easy_install module is deprecated",
  20. details="Avoid accessing attributes of setuptools.command.easy_install.",
  21. due_date=(2025, 10, 31),
  22. see_url="https://github.com/pypa/setuptools/issues/4976",
  23. )
  24. return attr