15a207
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
15a207
From: Peter Jones <pjones@redhat.com>
15a207
Date: Tue, 10 Jul 2018 16:54:02 -0400
15a207
Subject: [PATCH] Force everything to use python3
15a207
15a207
But this still means you need to do PYTHON=python=3 ./autogen.sh if you
15a207
run the world's worst tooling before you patch.
15a207
15a207
Signed-off-by: Peter Jones <pjones@redhat.com>
15a207
---
15a207
 conf/Makefile.common | 4 ++--
15a207
 gentpl.py            | 2 +-
15a207
 2 files changed, 3 insertions(+), 3 deletions(-)
15a207
15a207
diff --git a/conf/Makefile.common b/conf/Makefile.common
15a207
index c75848f5c06..1ecb921db65 100644
15a207
--- a/conf/Makefile.common
15a207
+++ b/conf/Makefile.common
15a207
@@ -128,11 +128,11 @@ BUILT_SOURCES =
15a207
 
15a207
 .PRECIOUS: $(top_srcdir)/Makefile.util.am
15a207
 $(top_srcdir)/Makefile.util.am: $(top_srcdir)/gentpl.py $(top_srcdir)/Makefile.util.def $(top_srcdir)/Makefile.utilgcry.def
15a207
-	python $^ > $@.new || (rm -f $@.new; exit 1)
15a207
+	python3 $^ > $@.new || (rm -f $@.new; exit 1)
15a207
 	mv $@.new $@
15a207
 
15a207
 .PRECIOUS: $(top_srcdir)/grub-core/Makefile.core.am
15a207
 $(top_srcdir)/grub-core/Makefile.core.am: $(top_srcdir)/gentpl.py $(top_srcdir)/grub-core/Makefile.core.def $(top_srcdir)/grub-core/Makefile.gcry.def
15a207
 	if [ "x$$GRUB_CONTRIB" != x ]; then echo "You need to run ./autogen.sh manually." >&2; exit 1; fi
15a207
-	python $^ > $@.new || (rm -f $@.new; exit 1)
15a207
+	python3 $^ > $@.new || (rm -f $@.new; exit 1)
15a207
 	mv $@.new $@
15a207
diff --git a/gentpl.py b/gentpl.py
15a207
index baac6a2af69..6409736e81c 100644
15a207
--- a/gentpl.py
15a207
+++ b/gentpl.py
15a207
@@ -1,4 +1,4 @@
15a207
-#! /usr/bin/python
15a207
+#! /usr/bin/env python3
15a207
 #  GRUB  --  GRand Unified Bootloader
15a207
 #  Copyright (C) 2010,2011,2012,2013  Free Software Foundation, Inc.
15a207
 #