dcavalca / rpms / grub2

Forked from rpms/grub2 3 years ago
Clone

Blame SOURCES/0216-Force-everything-to-use-python3.patch

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