summaryrefslogtreecommitdiff
path: root/distutils
diff options
context:
space:
mode:
Diffstat (limited to 'distutils')
-rw-r--r--distutils/command/build_scripts.py11
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