1From 44fe2328b715db25134ee095526d2fa47e6cd834 Mon Sep 17 00:00:00 2001 2From: "Yann E. MORIN" <yann.morin.1998@free.fr> 3Date: Wed, 1 Jan 2020 15:25:57 +0100 4Subject: [PATCH] python: ensure proper shabang on python scripts 5 6When instlling python scripts, distutils would use the python used to 7run setup.py as shabang for the scripts it installs. 8 9However, when cross-compiling, this is most often not correct. 10 11Instead, using '/usr/bin/env python' is guaranteed to find the proper 12python in the PATH, so we need to instruct setyup.py to use that as the 13executable. 14 15[yann.morin.1998@free.fr: 16 - author did not provide their SoB, but it's simple enough to 17 not require it for once 18 - provide proper commit log 19] 20Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr> 21[Fabrice: update for 6.0.0] 22Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com> 23--- 24 python/Makefile.am | 4 ++-- 25 1 file changed, 2 insertions(+), 2 deletions(-) 26 27diff --git a/python/Makefile.am b/python/Makefile.am 28index 59d195f29..a41604f72 100644 29--- a/python/Makefile.am 30+++ b/python/Makefile.am 31@@ -6,11 +6,11 @@ EXTRA_DIST = setup.py \ 32 if HAVE_PYTHON_DISTUTILS 33 all-local: 34 cd $(srcdir) && \ 35- $(HAVE_PYTHON) setup.py build --build-base "$(abs_builddir)" 36+ $(HAVE_PYTHON) setup.py build -e "/usr/bin/env python" --build-base "$(abs_builddir)" 37 38 install-exec-local: 39 cd $(srcdir) && \ 40- $(HAVE_PYTHON) setup.py build --build-base "$(abs_builddir)" \ 41+ $(HAVE_PYTHON) setup.py build -e "/usr/bin/env python" --build-base "$(abs_builddir)" \ 42 install --prefix $(DESTDIR)$(prefix) 43 44 uninstall-local: 45-- 462.20.1 47 48