summaryrefslogtreecommitdiffstats
path: root/package/python/0015-Do-not-adjust-the-shebang-of-Python-scripts-for-cros.patch
diff options
context:
space:
mode:
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>2017-03-08 00:00:26 +0100
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>2017-03-09 22:35:21 +0100
commit652076293235276e2f978fe377322a6cbd615455 (patch)
tree9de85c8771bbff3dc8dee18aa23e38b29c3cfa90 /package/python/0015-Do-not-adjust-the-shebang-of-Python-scripts-for-cros.patch
parent98b831b855559ba2bc3fcdccf9c29c4936008d12 (diff)
downloadbuildroot-652076293235276e2f978fe377322a6cbd615455.tar.gz
buildroot-652076293235276e2f978fe377322a6cbd615455.zip
python: move to Git formatted patches
Now that the cpython project has a nice Github repository, with tags, it's much nicer to handle the stack of Python patches with Git. The python3 package patches had already been converted, but not the python package patches. Therefore, this commit does the move. There is no functional change, only reformatting of the patches. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Reviewed-by: Yegor Yefremov <yegorslists@googlemail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Diffstat (limited to 'package/python/0015-Do-not-adjust-the-shebang-of-Python-scripts-for-cros.patch')
-rw-r--r--package/python/0015-Do-not-adjust-the-shebang-of-Python-scripts-for-cros.patch35
1 files changed, 35 insertions, 0 deletions
diff --git a/package/python/0015-Do-not-adjust-the-shebang-of-Python-scripts-for-cros.patch b/package/python/0015-Do-not-adjust-the-shebang-of-Python-scripts-for-cros.patch
new file mode 100644
index 0000000000..fecf29f4d6
--- /dev/null
+++ b/package/python/0015-Do-not-adjust-the-shebang-of-Python-scripts-for-cros.patch
@@ -0,0 +1,35 @@
+From 70049366ddf1fc9084bb02cf4459380976cdf8f7 Mon Sep 17 00:00:00 2001
+From: Christophe Vu-Brugier <cvubrugier@fastmail.fm>
+Date: Tue, 7 Mar 2017 22:26:09 +0100
+Subject: [PATCH] Do not adjust the shebang of Python scripts for
+ cross-compilation
+
+The copy_scripts() method in distutils copies the scripts listed in
+the setup file and adjusts the first line to refer to the current
+Python interpreter. When cross-compiling, this means that the adjusted
+shebang refers to the host Python interpreter.
+
+This patch modifies copy_scripts() to preserve the shebang when
+cross-compilation is detected.
+
+Signed-off-by: Christophe Vu-Brugier <cvubrugier@fastmail.fm>
+---
+ Lib/distutils/command/build_scripts.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Lib/distutils/command/build_scripts.py b/Lib/distutils/command/build_scripts.py
+index 567df65..4922d50 100644
+--- a/Lib/distutils/command/build_scripts.py
++++ b/Lib/distutils/command/build_scripts.py
+@@ -89,7 +89,7 @@ class build_scripts (Command):
+ adjust = 1
+ post_interp = match.group(1) or ''
+
+- if adjust:
++ if adjust and not '_python_sysroot' in os.environ:
+ log.info("copying and adjusting %s -> %s", script,
+ self.build_dir)
+ if not self.dry_run:
+--
+2.7.4
+
OpenPOWER on IntegriCloud