package/xfont_font-cronyx-cyrillic: add hash file
[buildroot-gz.git] / package / python-setuptools / 0001-add-executable.patch
blob1f8714eaeba4f4ce72a6b1cf23ae8e50de73cb7e
1 From 9b3d307f8f6a1af88f3f810f5a6cf0835830e1e8 Mon Sep 17 00:00:00 2001
2 From: =?UTF-8?q?J=C3=B6rg=20Krause?= <joerg.krause@embedded.rocks>
3 Date: Mon, 7 Dec 2015 01:14:33 +0100
4 Subject: [PATCH 1/1] add executable
5 MIME-Version: 1.0
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
9 Add a new --executable option to distribute so that we can
10 force the shebang line in installed python scripts.
12 [Thomas: refresh for setuptools 5.8.]
13 [Jörg: refresh for setuptools 18.7.1]
15 Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
16 Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
17 Signed-off-by: Jörg Krause <joerg.krause@embedded.rocks>
18 ---
19 setuptools/command/install.py | 2 ++
20 setuptools/command/install_scripts.py | 9 +++++++++
21 2 files changed, 11 insertions(+)
23 diff --git a/setuptools/command/install.py b/setuptools/command/install.py
24 index d2bca2e..b60ef19 100644
25 --- a/setuptools/command/install.py
26 +++ b/setuptools/command/install.py
27 @@ -16,6 +16,7 @@ class install(orig.install):
28 """Use easy_install to install the package, w/dependencies"""
30 user_options = orig.install.user_options + [
31 + ('executable=', 'e', "specify final destination interpreter path"),
32 ('old-and-unmanageable', None, "Try not to use this!"),
33 ('single-version-externally-managed', None,
34 "used by system package builders to create 'flat' eggs"),
35 @@ -31,6 +32,7 @@ class install(orig.install):
37 def initialize_options(self):
38 orig.install.initialize_options(self)
39 + self.executable = None
40 self.old_and_unmanageable = None
41 self.single_version_externally_managed = None
43 diff --git a/setuptools/command/install_scripts.py b/setuptools/command/install_scripts.py
44 index be66cb2..07afaf8 100755
45 --- a/setuptools/command/install_scripts.py
46 +++ b/setuptools/command/install_scripts.py
47 @@ -11,6 +11,13 @@ class install_scripts(orig.install_scripts):
48 def initialize_options(self):
49 orig.install_scripts.initialize_options(self)
50 self.no_ep = False
51 + self.executable = None
53 + def finalize_options(self):
54 + orig.install_scripts.finalize_options(self)
55 + self.set_undefined_options('install',
56 + ('executable','executable')
57 + )
59 def run(self):
60 import setuptools.command.easy_install as ei
61 @@ -31,6 +38,8 @@ class install_scripts(orig.install_scripts):
63 bs_cmd = self.get_finalized_command('build_scripts')
64 exec_param = getattr(bs_cmd, 'executable', None)
65 + if self.executable is not None:
66 + exec_param = self.executable
67 bw_cmd = self.get_finalized_command("bdist_wininst")
68 is_wininst = getattr(bw_cmd, '_is_running', False)
69 writer = ei.ScriptWriter
70 --
71 2.6.3