1 Do not adjust the shebang of Python scripts for cross-compilation
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.
8 This patch modifies copy_scripts() to preserve the shebang when
9 cross-compilation is detected.
11 Signed-off-by: Christophe Vu-Brugier <cvubrugier@fastmail.fm>
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
19 post_interp = match.group(1) or ''
22 + if adjust and not '_python_sysroot' in os.environ:
23 log.info("copying and adjusting %s -> %s", script,