summaryrefslogtreecommitdiff
path: root/setuptools/command
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2021-01-23 19:35:27 -0500
committerJason R. Coombs <jaraco@jaraco.com>2021-01-23 19:35:27 -0500
commit2885ca26494e6f555fae85f8f9983c2361c93829 (patch)
tree1e21301b8f0178951321c4cdcb570b7d89c853ce /setuptools/command
parent4b0408a18dcda286af6668b7ef6934e53d1f247c (diff)
downloadpython-setuptools-git-2885ca26494e6f555fae85f8f9983c2361c93829.tar.gz
Remove 'main' function from 'easy_install'.
Diffstat (limited to 'setuptools/command')
-rw-r--r--setuptools/command/easy_install.py46
1 files changed, 1 insertions, 45 deletions
diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py
index 544e8fd4..eeb21b50 100644
--- a/setuptools/command/easy_install.py
+++ b/setuptools/command/easy_install.py
@@ -67,7 +67,7 @@ warnings.filterwarnings("default", category=pkg_resources.PEP440Warning)
__all__ = [
'samefile', 'easy_install', 'PthDistributions', 'extract_wininst_cfg',
- 'main', 'get_exe_prefixes',
+ 'get_exe_prefixes',
]
@@ -2284,50 +2284,6 @@ def current_umask():
return tmp
-def main(argv=None, **kw):
- from setuptools import setup
- from setuptools.dist import Distribution
-
- class DistributionWithoutHelpCommands(Distribution):
- common_usage = ""
-
- def _show_help(self, *args, **kw):
- with _patch_usage():
- Distribution._show_help(self, *args, **kw)
-
- if argv is None:
- argv = sys.argv[1:]
-
- with _patch_usage():
- setup(
- script_args=['-q', 'easy_install', '-v'] + argv,
- script_name=sys.argv[0] or 'easy_install',
- distclass=DistributionWithoutHelpCommands,
- **kw
- )
-
-
-@contextlib.contextmanager
-def _patch_usage():
- import distutils.core
- USAGE = textwrap.dedent("""
- usage: %(script)s [options] requirement_or_url ...
- or: %(script)s --help
- """).lstrip()
-
- def gen_usage(script_name):
- return USAGE % dict(
- script=os.path.basename(script_name),
- )
-
- saved = distutils.core.gen_usage
- distutils.core.gen_usage = gen_usage
- try:
- yield
- finally:
- distutils.core.gen_usage = saved
-
-
class EasyInstallDeprecationWarning(SetuptoolsDeprecationWarning):
"""
Warning for EasyInstall deprecations, bypassing suppression.