1 Add a new --executable option to distribute so that we can
2 force the shebang line in installed python scripts.
4 [Thomas: refresh for setuptools 5.8.]
6 Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
7 Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
9 Index: b/setuptools/command/install.py
10 ===================================================================
11 --- a/setuptools/command/install.py
12 +++ b/setuptools/command/install.py
14 """Use easy_install to install the package, w/dependencies"""
16 user_options = orig.install.user_options + [
17 + ('executable=', 'e', "specify final destination interpreter path"),
18 ('old-and-unmanageable', None, "Try not to use this!"),
19 ('single-version-externally-managed', None,
20 "used by system package builders to create 'flat' eggs"),
23 def initialize_options(self):
24 orig.install.initialize_options(self)
25 + self.executable = None
26 self.old_and_unmanageable = None
27 self.single_version_externally_managed = None
29 Index: b/setuptools/command/install_scripts.py
30 ===================================================================
31 --- a/setuptools/command/install_scripts.py
32 +++ b/setuptools/command/install_scripts.py
34 def initialize_options(self):
35 orig.install_scripts.initialize_options(self)
37 + self.executable = None
39 + def finalize_options(self):
40 + orig.install_scripts.finalize_options(self)
41 + self.set_undefined_options('install',
42 + ('executable','executable')
46 from setuptools.command.easy_install import get_script_args
49 bs_cmd = self.get_finalized_command('build_scripts')
50 executable = getattr(bs_cmd, 'executable', sys_executable)
51 + if self.executable is not None:
52 + executable = self.executable
54 self.get_finalized_command("bdist_wininst"), '_is_running', False