python: patch distutils adjusting path in scripts' shebang 962/head
authorJan Čermák <jan.cermak@nic.cz>
Fri, 27 Feb 2015 13:32:56 +0000 (14:32 +0100)
committerJan Čermák <jan.cermak@nic.cz>
Fri, 27 Feb 2015 17:11:19 +0000 (18:11 +0100)
When distutils are copying scripts, path to Python interpreter is adjusted.
This does not work well in OpenWrt buildroot, because the path is adjusted
to absolute path to host Python then. This patch simply disables the
adjusting of the path.

Signed-off-by: Jan Čermák <jan.cermak@nic.cz>
lang/python/patches/170-distutils-do-not-adjust-path.patch [new file with mode: 0644]

diff --git a/lang/python/patches/170-distutils-do-not-adjust-path.patch b/lang/python/patches/170-distutils-do-not-adjust-path.patch
new file mode 100644 (file)
index 0000000..49fe926
--- /dev/null
@@ -0,0 +1,10 @@
+--- a/Lib/distutils/command/build_scripts.py
++++ b/Lib/distutils/command/build_scripts.py
+@@ -89,6 +89,7 @@ class build_scripts (Command):
+                     adjust = 1
+                     post_interp = match.group(1) or ''
++            adjust = 0
+             if adjust:
+                 log.info("copying and adjusting %s -> %s", script,
+                          self.build_dir)