"""distutils.command.build_scripts
Implements the Distutils 'build_scripts' command."""
from distutils import sysconfig
from distutils.core import Command
from distutils.dep_util import newer
from distutils.util import convert_path, Mixin2to3
from distutils import log
# 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)"
('build-dir=', 'd', "directory to \"build\" (copy) to"),
('force', 'f', "forcibly build everything (ignore file timestamps"),
('executable=', 'e', "specify final destination interpreter path"),
boolean_options = ['force']
def initialize_options(self):
def finalize_options(self):
self.set_undefined_options('build',
('build_scripts', 'build_dir'),
('executable', 'executable'))
self.scripts = self.distribution.scripts