tools: Use INSTALL_PYTHON_PROG
authorAnthony PERARD <anthony.perard@citrix.com>
Wed, 11 Mar 2020 17:59:33 +0000 (17:59 +0000)
committerWei Liu <wl@xen.org>
Tue, 19 May 2020 10:40:53 +0000 (11:40 +0100)
Whenever python scripts are install, have the shebang be modified to use
whatever PYTHON_PATH is. This is useful for system where python isn't available, or
where the package build tools prevent unversioned shebang.

INSTALL_PYTHON_PROG only looks for "#!/usr/bin/env python".

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Acked-by: Wei Liu <wl@xen.org>
tools/misc/xencov_split
tools/python/Makefile
tools/xenmon/Makefile

index 1f20518b86379a8efadd6d04c873d7bf2aa63515..5771f6cfc28595d3a16be7f976323b8c6dfb34a1 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
 
 import sys, os, os.path as path, struct, errno
 from optparse import OptionParser
index e99f78a5373acf8b71b4de54f70541e608bade92..8d22c03676571eb3d925178d24d3c0408bfed966 100644 (file)
@@ -20,8 +20,8 @@ install:
                setup.py install --record $(INSTALL_LOG) $(PYTHON_PREFIX_ARG) \
                --root="$(DESTDIR)" --force
 
-       $(INSTALL_PROG) scripts/convert-legacy-stream $(DESTDIR)$(LIBEXEC_BIN)
-       $(INSTALL_PROG) scripts/verify-stream-v2 $(DESTDIR)$(LIBEXEC_BIN)
+       $(INSTALL_PYTHON_PROG) scripts/convert-legacy-stream $(DESTDIR)$(LIBEXEC_BIN)
+       $(INSTALL_PYTHON_PROG) scripts/verify-stream-v2 $(DESTDIR)$(LIBEXEC_BIN)
 
 .PHONY: uninstall
 uninstall:
index e1712304d07d1e7e7220109eb8101c392302dd6c..3e150b065998789efd49b1a8f0760b207147ac82 100644 (file)
@@ -32,7 +32,7 @@ install: build
        $(INSTALL_DIR) $(DESTDIR)$(sbindir)
        $(INSTALL_PROG) xenbaked $(DESTDIR)$(sbindir)/xenbaked
        $(INSTALL_PROG) xentrace_setmask  $(DESTDIR)$(sbindir)/xentrace_setmask
-       $(INSTALL_PROG) xenmon.py  $(DESTDIR)$(sbindir)/xenmon
+       $(INSTALL_PYTHON_PROG) xenmon.py  $(DESTDIR)$(sbindir)/xenmon
 
 .PHONY: uninstall
 uninstall: