micropython: Bump version to v1.5
[buildroot-gz.git] / package / python-setuptools / 0001-add-executable.patch
blob502d099cc65cffd8a52e5f9c92d446e59122be6f
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
13 @@ -16,6 +16,7 @@
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"),
21 @@ -31,6 +32,7 @@
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
33 @@ -11,6 +11,13 @@
34 def initialize_options(self):
35 orig.install_scripts.initialize_options(self)
36 self.no_ep = False
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')
43 + )
45 def run(self):
46 from setuptools.command.easy_install import get_script_args
47 @@ -32,6 +39,8 @@
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
53 is_wininst = getattr(
54 self.get_finalized_command("bdist_wininst"), '_is_running', False