0001-TOOLS-d2c-py-explicitly-use-the-python3-interpreter.patch 1.2 KB

1234567891011121314151617181920212223242526272829303132333435
  1. From 888c94e7a121d96aa88f84c58fe7e2bd771fc5ac Mon Sep 17 00:00:00 2001
  2. From: Julien Olivain <ju.o@free.fr>
  3. Date: Fri, 25 Aug 2023 21:56:37 +0200
  4. Subject: [PATCH] TOOLS: d2c.py: explicitly use the python3 interpreter
  5. When compiling Xvisor on a system not providing the "python"
  6. interpreter binary, compilation fails with output:
  7. (d2c) core/vio/keymaps/modifiers.c
  8. /bin/sh: 1: /build/xvisor-0.3.2/tools/scripts/d2c.py: not found
  9. This commit fixes the issue following the PEP 394 recommendation:
  10. https://peps.python.org/pep-0394/
  11. It sets the "shebang" to `#! /usr/bin/env python3` to allow using other
  12. interpreters in the PATH, or virtual environment.
  13. Signed-off-by: Julien Olivain <ju.o@free.fr>
  14. Upstream: https://github.com/xvisor/xvisor/commit/888c94e7a121d96aa88f84c58fe7e2bd771fc5ac
  15. Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
  16. ---
  17. tools/scripts/d2c.py | 2 +-
  18. 1 file changed, 1 insertion(+), 1 deletion(-)
  19. diff --git a/tools/scripts/d2c.py b/tools/scripts/d2c.py
  20. index b46a7bc468..daac4a5450 100755
  21. --- a/tools/scripts/d2c.py
  22. +++ b/tools/scripts/d2c.py
  23. @@ -1,4 +1,4 @@
  24. -#!/usr/bin/python
  25. +#! /usr/bin/env python3
  26. #/**
  27. # Copyright (c) 2013 Anup Patel.
  28. # All rights reserved.