aboutsummaryrefslogtreecommitdiffstats
path: root/setuptools/command/easy_install.py
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2020-01-19 12:46:30 -0500
committerJason R. Coombs <jaraco@jaraco.com>2020-01-19 12:46:30 -0500
commit3d4d8b9dde61b87271861b8c7ebeb168ac4fa72b (patch)
treeffbf9cd5a02337ced626892b672b7e21bd305717 /setuptools/command/easy_install.py
parenta0e8d0568d84e29066a5b45aade5aafe28237ec0 (diff)
downloadexternal_python_setuptools-3d4d8b9dde61b87271861b8c7ebeb168ac4fa72b.tar.gz
external_python_setuptools-3d4d8b9dde61b87271861b8c7ebeb168ac4fa72b.tar.bz2
external_python_setuptools-3d4d8b9dde61b87271861b8c7ebeb168ac4fa72b.zip
👹 Feed the hobgoblins (delint).
Diffstat (limited to 'setuptools/command/easy_install.py')
-rw-r--r--setuptools/command/easy_install.py31
1 files changed, 18 insertions, 13 deletions
diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py
index 426301d6..b95ef1f6 100644
--- a/setuptools/command/easy_install.py
+++ b/setuptools/command/easy_install.py
@@ -121,7 +121,8 @@ else:
return False
-_one_liner = lambda text: textwrap.dedent(text).strip().replace('\n', '; ')
+def _one_liner(text):
+ return textwrap.dedent(text).strip().replace('\n', '; ')
class easy_install(Command):
@@ -414,8 +415,8 @@ class easy_install(Command):
if show_deprecation:
self.announce(
"WARNING: The easy_install command is deprecated "
- "and will be removed in a future version."
- , log.WARN,
+ "and will be removed in a future version.",
+ log.WARN,
)
if self.verbose != self.distribution.verbose:
log.set_verbosity(self.verbose)
@@ -507,13 +508,13 @@ class easy_install(Command):
the distutils default setting) was:
%s
- """).lstrip()
+ """).lstrip() # noqa
__not_exists_id = textwrap.dedent("""
This directory does not currently exist. Please create it and try again, or
choose a different installation directory (using the -d or --install-dir
option).
- """).lstrip()
+ """).lstrip() # noqa
__access_msg = textwrap.dedent("""
Perhaps your account does not have write access to this directory? If the
@@ -529,7 +530,7 @@ class easy_install(Command):
https://setuptools.readthedocs.io/en/latest/easy_install.html
Please make the appropriate changes for your system and try again.
- """).lstrip()
+ """).lstrip() # noqa
def cant_write_to_target(self):
msg = self.__cant_write_msg % (sys.exc_info()[1], self.install_dir,)
@@ -1093,13 +1094,13 @@ class easy_install(Command):
pkg_resources.require("%(name)s") # latest installed version
pkg_resources.require("%(name)s==%(version)s") # this exact version
pkg_resources.require("%(name)s>=%(version)s") # this version or higher
- """).lstrip()
+ """).lstrip() # noqa
__id_warning = textwrap.dedent("""
Note also that the installation directory must be on sys.path at runtime for
this to work. (e.g. by being the application's script directory, by being on
PYTHONPATH, or by being added to sys.path by your code.)
- """)
+ """) # noqa
def installation_report(self, req, dist, what="Installed"):
"""Helpful installation message for display to package users"""
@@ -1124,7 +1125,7 @@ class easy_install(Command):
%(python)s setup.py develop
See the setuptools documentation for the "develop" command for more info.
- """).lstrip()
+ """).lstrip() # noqa
def report_editable(self, spec, setup_script):
dirname = os.path.dirname(setup_script)
@@ -1307,7 +1308,8 @@ class easy_install(Command):
https://setuptools.readthedocs.io/en/latest/easy_install.html#custom-installation-locations
- Please make the appropriate changes for your system and try again.""").lstrip()
+ Please make the appropriate changes for your system and try again.
+ """).strip()
def no_default_version_msg(self):
template = self.__no_default_msg
@@ -2093,7 +2095,8 @@ class ScriptWriter:
@classmethod
def get_script_header(cls, script_text, executable=None, wininst=False):
# for backward compatibility
- warnings.warn("Use get_header", EasyInstallDeprecationWarning, stacklevel=2)
+ warnings.warn(
+ "Use get_header", EasyInstallDeprecationWarning, stacklevel=2)
if wininst:
executable = "python.exe"
return cls.get_header(script_text, executable)
@@ -2342,6 +2345,8 @@ def _patch_usage():
finally:
distutils.core.gen_usage = saved
+
class EasyInstallDeprecationWarning(SetuptoolsDeprecationWarning):
- """Class for warning about deprecations in EasyInstall in SetupTools. Not ignored by default, unlike DeprecationWarning."""
-
+ """
+ Warning for EasyInstall deprecations, bypassing suppression.
+ """