* [PATCH 1/1] autogen.sh: detect python3
@ 2021-08-13 18:46 Heinrich Schuchardt
2021-08-26 14:48 ` Daniel Kiper
0 siblings, 1 reply; 2+ messages in thread
From: Heinrich Schuchardt @ 2021-08-13 18:46 UTC (permalink / raw)
To: Daniel Kiper; +Cc: Heinrich Schuchardt, grub-devel, Heinrich Schuchardt
On some current distributions there is no /usr/bin/python. The Python
binary is /usr/bin/python3. If a command python3 is available, use it
instead.
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
---
autogen.sh | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/autogen.sh b/autogen.sh
index 31b0ced7e..c95df3bf0 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -7,8 +7,12 @@ if [ ! -e grub-core/lib/gnulib/stdlib.in.h ]; then
exit 1
fi
-# Set ${PYTHON} to plain 'python' if not set already
+# Set ${PYTHON} to 'python3' or plain 'python' if not set already
+if python3 --version 2>/dev/null; then
+: ${PYTHON:=python3}
+else
: ${PYTHON:=python}
+fi
export LC_COLLATE=C
unset LC_ALL
--
2.30.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 1/1] autogen.sh: detect python3
2021-08-13 18:46 [PATCH 1/1] autogen.sh: detect python3 Heinrich Schuchardt
@ 2021-08-26 14:48 ` Daniel Kiper
0 siblings, 0 replies; 2+ messages in thread
From: Daniel Kiper @ 2021-08-26 14:48 UTC (permalink / raw)
To: Heinrich Schuchardt; +Cc: Heinrich Schuchardt, grub-devel
On Fri, Aug 13, 2021 at 08:46:24PM +0200, Heinrich Schuchardt wrote:
> On some current distributions there is no /usr/bin/python. The Python
> binary is /usr/bin/python3. If a command python3 is available, use it
> instead.
>
> Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
I prefer solution proposed here [1]. Of course with some changes
discussed in the thread.
Daniel
[1] https://lists.gnu.org/archive/html/grub-devel/2021-08/msg00019.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-08-26 14:48 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-13 18:46 [PATCH 1/1] autogen.sh: detect python3 Heinrich Schuchardt
2021-08-26 14:48 ` Daniel Kiper
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.