Browse Source

python: patch distutils adjusting path in scripts' shebang

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>
lilik-openwrt-22.03
Jan Čermák 10 years ago
parent
commit
71b696622a
1 changed files with 10 additions and 0 deletions
  1. +10
    -0
      lang/python/patches/170-distutils-do-not-adjust-path.patch

+ 10
- 0
lang/python/patches/170-distutils-do-not-adjust-path.patch View File

@ -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)

Loading…
Cancel
Save