board/csky: fixup gdb instructions in readme.txt
[buildroot-gz.git] / package / python / 0015-Do-not-adjust-the-shebang-of-Python-scripts-for-cros.patch
blobfecf29f4d676981c0f6d146ec4c1b597e135746b
1 From 70049366ddf1fc9084bb02cf4459380976cdf8f7 Mon Sep 17 00:00:00 2001
2 From: Christophe Vu-Brugier <cvubrugier@fastmail.fm>
3 Date: Tue, 7 Mar 2017 22:26:09 +0100
4 Subject: [PATCH] Do not adjust the shebang of Python scripts for
5 cross-compilation
7 The copy_scripts() method in distutils copies the scripts listed in
8 the setup file and adjusts the first line to refer to the current
9 Python interpreter. When cross-compiling, this means that the adjusted
10 shebang refers to the host Python interpreter.
12 This patch modifies copy_scripts() to preserve the shebang when
13 cross-compilation is detected.
15 Signed-off-by: Christophe Vu-Brugier <cvubrugier@fastmail.fm>
16 ---
17 Lib/distutils/command/build_scripts.py | 2 +-
18 1 file changed, 1 insertion(+), 1 deletion(-)
20 diff --git a/Lib/distutils/command/build_scripts.py b/Lib/distutils/command/build_scripts.py
21 index 567df65..4922d50 100644
22 --- a/Lib/distutils/command/build_scripts.py
23 +++ b/Lib/distutils/command/build_scripts.py
24 @@ -89,7 +89,7 @@ class build_scripts (Command):
25 adjust = 1
26 post_interp = match.group(1) or ''
28 - if adjust:
29 + if adjust and not '_python_sysroot' in os.environ:
30 log.info("copying and adjusting %s -> %s", script,
31 self.build_dir)
32 if not self.dry_run:
33 --
34 2.7.4