From 129480b92212c4821329caaa626ad3379478e001 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 31 Jul 2022 14:41:23 -0400 Subject: [PATCH] =?UTF-8?q?=E2=9A=AB=20Fade=20to=20black.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- distutils/command/bdist.py | 24 +++++++++++++----------- distutils/cygwinccompiler.py | 2 +- distutils/unixccompiler.py | 3 ++- 3 files changed, 16 insertions(+), 13 deletions(-) diff --git a/distutils/command/bdist.py b/distutils/command/bdist.py index 6980c3eb9b..53f1321450 100644 --- a/distutils/command/bdist.py +++ b/distutils/command/bdist.py @@ -71,17 +71,19 @@ class bdist(Command): default_format = {'posix': 'gztar', 'nt': 'zip'} # Define commands in preferred order for the --help-formats option - format_commands = ListCompat({ - 'rpm': ('bdist_rpm', "RPM distribution"), - 'gztar': ('bdist_dumb', "gzip'ed tar file"), - 'bztar': ('bdist_dumb', "bzip2'ed tar file"), - 'xztar': ('bdist_dumb', "xz'ed tar file"), - 'ztar': ('bdist_dumb', "compressed tar file"), - 'tar': ('bdist_dumb', "tar file"), - 'wininst': ('bdist_wininst', "Windows executable installer"), - 'zip': ('bdist_dumb', "ZIP file"), - 'msi': ('bdist_msi', "Microsoft Installer"), - }) + format_commands = ListCompat( + { + 'rpm': ('bdist_rpm', "RPM distribution"), + 'gztar': ('bdist_dumb', "gzip'ed tar file"), + 'bztar': ('bdist_dumb', "bzip2'ed tar file"), + 'xztar': ('bdist_dumb', "xz'ed tar file"), + 'ztar': ('bdist_dumb', "compressed tar file"), + 'tar': ('bdist_dumb', "tar file"), + 'wininst': ('bdist_wininst', "Windows executable installer"), + 'zip': ('bdist_dumb', "ZIP file"), + 'msi': ('bdist_msi', "Microsoft Installer"), + } + ) # for compatibility until Setuptools references only format_commands format_command = format_commands diff --git a/distutils/cygwinccompiler.py b/distutils/cygwinccompiler.py index 50b8bbe5c1..e376446f1b 100644 --- a/distutils/cygwinccompiler.py +++ b/distutils/cygwinccompiler.py @@ -104,7 +104,7 @@ def get_msvcr(): _runtime_library_dirs_msg = ( "Unable to set runtime library search path on Windows, " "usually indicated by `runtime_library_dirs` parameter to Extension" - ) +) class CygwinCCompiler(UnixCCompiler): diff --git a/distutils/unixccompiler.py b/distutils/unixccompiler.py index 2e227bc20e..e4d930ac91 100644 --- a/distutils/unixccompiler.py +++ b/distutils/unixccompiler.py @@ -350,7 +350,8 @@ def _library_root(dir): apply_root = ( sys.platform == 'darwin' - and match and ( + and match + and ( dir.startswith('/System/') or (dir.startswith('/usr/') and not dir.startswith('/usr/local/')) )