diff options
| author | Jason R. Coombs <jaraco@jaraco.com> | 2022-03-27 10:20:24 -0400 |
|---|---|---|
| committer | Jason R. Coombs <jaraco@jaraco.com> | 2022-03-27 10:20:24 -0400 |
| commit | b16cf407dcbbfab0df079e894819ea5dce166b48 (patch) | |
| tree | 6b5249ee69509e2f9f31ba4772e7a8d45b7afa43 | |
| parent | 61bc807afbbd4b8d42bcd4dc966d5439ad9fa85a (diff) | |
| download | python-setuptools-git-b16cf407dcbbfab0df079e894819ea5dce166b48.tar.gz | |
👹 Feed the hobgoblins (delint).
| -rw-r--r-- | distutils/command/build_scripts.py | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/distutils/command/build_scripts.py b/distutils/command/build_scripts.py index e3312cf0..dbeef2dd 100644 --- a/distutils/command/build_scripts.py +++ b/distutils/command/build_scripts.py @@ -2,7 +2,8 @@ Implements the Distutils 'build_scripts' command.""" -import os, re +import os +import re from stat import ST_MODE from distutils import sysconfig from distutils.core import Command @@ -14,6 +15,7 @@ import tokenize # check if Python is called on the first line with this expression first_line_re = re.compile(b'^#!.*python[0-9.]*([ \t].*)?$') + class build_scripts(Command): description = "\"build\" scripts (copy and fixup #! line)" @@ -26,7 +28,6 @@ class build_scripts(Command): boolean_options = ['force'] - def initialize_options(self): self.build_dir = None self.scripts = None @@ -49,7 +50,6 @@ class build_scripts(Command): return self.copy_scripts() - def copy_scripts(self): r"""Copy each script listed in 'self.scripts'; if it's marked as a Python script in the Unix way (first line matches 'first_line_re', @@ -101,8 +101,9 @@ class build_scripts(Command): else: executable = os.path.join( sysconfig.get_config_var("BINDIR"), - "python%s%s" % (sysconfig.get_config_var("VERSION"), - sysconfig.get_config_var("EXE"))) + "python%s%s" % ( + sysconfig.get_config_var("VERSION"), + sysconfig.get_config_var("EXE"))) executable = os.fsencode(executable) shebang = b"#!" + executable + post_interp + b"\n" # Python parser starts to read a script using UTF-8 until |
