The cirros image was rebuilt against the 3.13.0-83 kernel, drivers e1000e, igbvf...
[packages/trusty/cirros-testvm.git] / cirros-testvm / src-cirros / buildroot-2015.05 / package / python / 017-distutils-scripts-dont-adjust-shebang.patch
1 Do not adjust the shebang of Python scripts for cross-compilation
2
3 The copy_scripts() method in distutils copies the scripts listed in
4 the setup file and adjusts the first line to refer to the current
5 Python interpreter. When cross-compiling, this means that the adjusted
6 shebang refers to the host Python interpreter.
7
8 This patch modifies copy_scripts() to preserve the shebang when
9 cross-compilation is detected.
10
11 Signed-off-by: Christophe Vu-Brugier <cvubrugier@fastmail.fm>
12
13 Index: b/Lib/distutils/command/build_scripts.py
14 ===================================================================
15 --- a/Lib/distutils/command/build_scripts.py
16 +++ b/Lib/distutils/command/build_scripts.py
17 @@ -89,7 +89,7 @@
18                      adjust = 1
19                      post_interp = match.group(1) or ''
20  
21 -            if adjust:
22 +            if adjust and not '_python_sysroot' in os.environ:
23                  log.info("copying and adjusting %s -> %s", script,
24                           self.build_dir)
25                  if not self.dry_run: