summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmil Velikov <emil.l.velikov@gmail.com>2018-08-24 11:14:15 +0100
committerEmil Velikov <emil.l.velikov@gmail.com>2018-08-24 11:14:15 +0100
commitcff80b6c153661ed40a207815a3d3a132daae656 (patch)
tree9942a8361e0d4d7662af8e782c21388a725880b1
parent7a4d2d1fdf3fd6dd79cda971b5b3669fc7fbc729 (diff)
Revert "configure: allow building with python3"
This reverts commit ae7898dfdbe5c8dab7d11c71862353f1ae43feb0. Turns out the python scripts are _not_ fully python 3 compatible. As Ilia reported using get_xmlpool.py with LANG=C produces some weird output - see the link for details. Even though the issue was spotted with the autoconf build, it exposes a genuine problem with the script (and lack of lang handling of the meson build.) https://lists.freedesktop.org/archives/mesa-dev/2018-August/203508.html
-rw-r--r--configure.ac8
-rw-r--r--m4/ax_check_python_mako_module.m42
-rw-r--r--src/Makefile.am2
-rw-r--r--src/amd/Makefile.common.am2
-rw-r--r--src/amd/vulkan/Makefile.am10
-rw-r--r--src/broadcom/Makefile.am2
-rw-r--r--src/compiler/Makefile.am2
-rw-r--r--src/compiler/Makefile.glsl.am2
-rwxr-xr-xsrc/compiler/glsl/glcpp/tests/glcpp-test.sh2
-rwxr-xr-xsrc/compiler/glsl/tests/optimization-test.sh2
-rwxr-xr-xsrc/compiler/glsl/tests/warnings-test.sh2
-rw-r--r--src/egl/Makefile.am2
-rw-r--r--src/gallium/auxiliary/Makefile.am2
-rw-r--r--src/gallium/drivers/freedreno/Makefile.am2
-rw-r--r--src/gallium/drivers/r600/Makefile.am2
-rw-r--r--src/gallium/drivers/radeonsi/Makefile.am2
-rw-r--r--src/gallium/drivers/swr/Makefile.am2
-rw-r--r--src/intel/Makefile.am2
-rw-r--r--src/intel/Makefile.compiler.am2
-rw-r--r--src/intel/Makefile.vulkan.am10
-rw-r--r--src/mapi/Makefile.am2
-rw-r--r--src/mapi/glapi/gen/Makefile.am2
-rw-r--r--src/mesa/Makefile.am2
-rw-r--r--src/mesa/drivers/dri/i965/Makefile.am2
-rw-r--r--src/util/Makefile.am2
-rw-r--r--src/util/xmlpool/Makefile.am2
-rw-r--r--src/vulkan/Makefile.am2
27 files changed, 39 insertions, 37 deletions
diff --git a/configure.ac b/configure.ac
index 8dea87fa6a8..f8bb131cb63 100644
--- a/configure.ac
+++ b/configure.ac
@@ -125,7 +125,9 @@ AC_PROG_GREP
AC_PROG_NM
AM_PROG_AS
AX_CHECK_GNU_MAKE
-AM_PATH_PYTHON([3.4],, [AM_PATH_PYTHON([2.7],, [:])])
+AM_PATH_PYTHON([2.7],, [:])
+PYTHON2=$PYTHON
+AC_SUBST([PYTHON2])
AC_PROG_SED
AC_PROG_MKDIR_P
@@ -158,7 +160,7 @@ fi
AX_CHECK_PYTHON_MAKO_MODULE($PYTHON_MAKO_REQUIRED)
-if test "$PYTHON" = ":"; then
+if test "$PYTHON2" = ":"; then
if test ! -f "$srcdir/src/util/format_srgb.c"; then
AC_MSG_ERROR([Python not found - unable to generate sources])
fi
@@ -3346,7 +3348,7 @@ if test "x$enable_llvm" = xyes; then
echo " LLVM_LDFLAGS: $LLVM_LDFLAGS"
echo ""
fi
-echo " PYTHON: $PYTHON"
+echo " PYTHON2: $PYTHON2"
echo ""
echo " Run '${MAKE-make}' to build Mesa"
diff --git a/m4/ax_check_python_mako_module.m4 b/m4/ax_check_python_mako_module.m4
index d6484e722fd..1d293d821c3 100644
--- a/m4/ax_check_python_mako_module.m4
+++ b/m4/ax_check_python_mako_module.m4
@@ -52,7 +52,7 @@ else:
ver_req = distutils.version.LooseVersion('$1')
ver_act = distutils.version.LooseVersion(mako.__version__)
sys.exit(int(ver_req > ver_act))
- " | $PYTHON -
+ " | $PYTHON2 -
if test $? -ne 0 ; then
AC_MSG_RESULT(no)
diff --git a/src/Makefile.am b/src/Makefile.am
index c91e63efa13..c4fcd8a9248 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -22,7 +22,7 @@
.PHONY: git_sha1.h
git_sha1.h:
@echo "updating $@"
- @$(PYTHON) $(top_srcdir)/bin/git_sha1_gen.py --output $@
+ @$(PYTHON2) $(top_srcdir)/bin/git_sha1_gen.py --output $@
BUILT_SOURCES = git_sha1.h
CLEANFILES = $(BUILT_SOURCES)
diff --git a/src/amd/Makefile.common.am b/src/amd/Makefile.common.am
index 453d23c3ac9..d62e9d41cf4 100644
--- a/src/amd/Makefile.common.am
+++ b/src/amd/Makefile.common.am
@@ -66,6 +66,6 @@ common_libamd_common_la_LIBADD = $(LIBELF_LIBS)
common/sid_tables.h: $(srcdir)/common/sid_tables.py $(srcdir)/common/sid.h $(srcdir)/common/gfx9d.h
$(AM_V_at)$(MKDIR_P) $(@D)
- $(AM_V_GEN) $(PYTHON) $(srcdir)/common/sid_tables.py $(srcdir)/common/sid.h $(srcdir)/common/gfx9d.h > $@
+ $(AM_V_GEN) $(PYTHON2) $(srcdir)/common/sid_tables.py $(srcdir)/common/sid.h $(srcdir)/common/gfx9d.h > $@
BUILT_SOURCES = $(AMD_GENERATED_FILES)
diff --git a/src/amd/vulkan/Makefile.am b/src/amd/vulkan/Makefile.am
index 2522171dacf..e28f032cbee 100644
--- a/src/amd/vulkan/Makefile.am
+++ b/src/amd/vulkan/Makefile.am
@@ -140,7 +140,7 @@ vulkan_api_xml = $(top_srcdir)/src/vulkan/registry/vk.xml
radv_entrypoints.c: radv_entrypoints_gen.py radv_extensions.py $(vulkan_api_xml)
$(MKDIR_GEN)
- $(AM_V_GEN)$(PYTHON) $(srcdir)/radv_entrypoints_gen.py \
+ $(AM_V_GEN)$(PYTHON2) $(srcdir)/radv_entrypoints_gen.py \
--xml $(vulkan_api_xml) \
--outdir $(builddir)
radv_entrypoints.h: radv_entrypoints.c
@@ -148,7 +148,7 @@ radv_entrypoints.h: radv_entrypoints.c
radv_extensions.c: radv_extensions.py \
$(vulkan_api_xml)
$(MKDIR_GEN)
- $(AM_V_GEN)$(PYTHON) $(srcdir)/radv_extensions.py \
+ $(AM_V_GEN)$(PYTHON2) $(srcdir)/radv_extensions.py \
--xml $(vulkan_api_xml) \
--out-c radv_extensions.c \
--out-h radv_extensions.h
@@ -157,7 +157,7 @@ radv_extensions.h: radv_extensions.c
vk_format_table.c: vk_format_table.py \
vk_format_parse.py \
vk_format_layout.csv
- $(PYTHON) $(srcdir)/vk_format_table.py $(srcdir)/vk_format_layout.csv > $@
+ $(PYTHON2) $(srcdir)/vk_format_table.py $(srcdir)/vk_format_layout.csv > $@
BUILT_SOURCES = $(VULKAN_GENERATED_FILES)
CLEANFILES = $(BUILT_SOURCES) dev_icd.json radeon_icd.@host_cpu@.json
@@ -190,11 +190,11 @@ icdconf_DATA = radeon_icd.@host_cpu@.json
noinst_DATA = dev_icd.json
dev_icd.json : radv_extensions.py radv_icd.py
- $(AM_V_GEN)$(PYTHON) $(srcdir)/radv_icd.py \
+ $(AM_V_GEN)$(PYTHON2) $(srcdir)/radv_icd.py \
--lib-path="${abs_top_builddir}/${LIB_DIR}" --out $@
radeon_icd.@host_cpu@.json : radv_extensions.py radv_icd.py
- $(AM_V_GEN)$(PYTHON) $(srcdir)/radv_icd.py \
+ $(AM_V_GEN)$(PYTHON2) $(srcdir)/radv_icd.py \
--lib-path="${libdir}" --out $@
include $(top_srcdir)/install-lib-links.mk
diff --git a/src/broadcom/Makefile.am b/src/broadcom/Makefile.am
index 4cd75bbcc06..4faa7721544 100644
--- a/src/broadcom/Makefile.am
+++ b/src/broadcom/Makefile.am
@@ -56,7 +56,7 @@ EXTRA_DIST = \
qpu/meson.build
MKDIR_GEN = $(AM_V_at)$(MKDIR_P) $(@D)
-PYTHON_GEN = $(AM_V_GEN)$(PYTHON) $(PYTHON_FLAGS)
+PYTHON_GEN = $(AM_V_GEN)$(PYTHON2) $(PYTHON_FLAGS)
include Makefile.genxml.am
include Makefile.cle.am
diff --git a/src/compiler/Makefile.am b/src/compiler/Makefile.am
index 05cdb1446c0..73435a3b5d6 100644
--- a/src/compiler/Makefile.am
+++ b/src/compiler/Makefile.am
@@ -68,7 +68,7 @@ EXTRA_DIST = \
meson.build
MKDIR_GEN = $(AM_V_at)$(MKDIR_P) $(@D)
-PYTHON_GEN = $(AM_V_GEN)$(PYTHON) $(PYTHON_FLAGS)
+PYTHON_GEN = $(AM_V_GEN)$(PYTHON2) $(PYTHON_FLAGS)
include Makefile.spirv.am
diff --git a/src/compiler/Makefile.glsl.am b/src/compiler/Makefile.glsl.am
index a323f7b05bc..02a7f432150 100644
--- a/src/compiler/Makefile.glsl.am
+++ b/src/compiler/Makefile.glsl.am
@@ -41,7 +41,7 @@ TESTS += glsl/glcpp/tests/glcpp-test.sh \
TESTS_ENVIRONMENT= \
export abs_builddir=$(abs_builddir); \
- export PYTHON=$(PYTHON); \
+ export PYTHON2=$(PYTHON2); \
export PYTHON_FLAGS=$(PYTHON_FLAGS);
check_PROGRAMS += \
diff --git a/src/compiler/glsl/glcpp/tests/glcpp-test.sh b/src/compiler/glsl/glcpp/tests/glcpp-test.sh
index 666a617bfb1..b8397ec8902 100755
--- a/src/compiler/glsl/glcpp/tests/glcpp-test.sh
+++ b/src/compiler/glsl/glcpp/tests/glcpp-test.sh
@@ -13,4 +13,4 @@ if [ -z "$srcdir" -o -z "$abs_builddir" ]; then
abs_builddir=`pwd`/../../../
fi
-$PYTHON $srcdir/glsl/glcpp/tests/glcpp_test.py $abs_builddir/glsl/glcpp/glcpp $srcdir/glsl/glcpp/tests --unix --windows --oldmac --bizarro
+$PYTHON2 $srcdir/glsl/glcpp/tests/glcpp_test.py $abs_builddir/glsl/glcpp/glcpp $srcdir/glsl/glcpp/tests --unix --windows --oldmac --bizarro
diff --git a/src/compiler/glsl/tests/optimization-test.sh b/src/compiler/glsl/tests/optimization-test.sh
index 751529a5159..410ed262ef0 100755
--- a/src/compiler/glsl/tests/optimization-test.sh
+++ b/src/compiler/glsl/tests/optimization-test.sh
@@ -1,3 +1,3 @@
#!/bin/sh
-$PYTHON $srcdir/glsl/tests/optimization_test.py --test-runner $abs_builddir/glsl/glsl_test
+$PYTHON2 $srcdir/glsl/tests/optimization_test.py --test-runner $abs_builddir/glsl/glsl_test
diff --git a/src/compiler/glsl/tests/warnings-test.sh b/src/compiler/glsl/tests/warnings-test.sh
index 12f68c2300f..09b6bb2fc98 100755
--- a/src/compiler/glsl/tests/warnings-test.sh
+++ b/src/compiler/glsl/tests/warnings-test.sh
@@ -1,3 +1,3 @@
#!/bin/sh
-$PYTHON $srcdir/glsl/tests/warnings_test.py --glsl-compiler $abs_builddir/glsl_compiler --test-directory $srcdir/glsl/tests/warnings/
+$PYTHON2 $srcdir/glsl/tests/warnings_test.py --glsl-compiler $abs_builddir/glsl_compiler --test-directory $srcdir/glsl/tests/warnings/
diff --git a/src/egl/Makefile.am b/src/egl/Makefile.am
index 24a8e96a8e1..bf7f87015b7 100644
--- a/src/egl/Makefile.am
+++ b/src/egl/Makefile.am
@@ -141,7 +141,7 @@ GLVND_GEN_DEPS = generate/gen_egl_dispatch.py \
generate/egl.xml generate/eglFunctionList.py generate/genCommon.py \
generate/egl_other.xml
-PYTHON_GEN = $(AM_V_GEN)$(PYTHON) $(PYTHON_FLAGS)
+PYTHON_GEN = $(AM_V_GEN)$(PYTHON2) $(PYTHON_FLAGS)
g_egldispatchstubs.c: $(GLVND_GEN_DEPS)
$(PYTHON_GEN) $(top_srcdir)/src/egl/generate/gen_egl_dispatch.py source \
$(top_srcdir)/src/egl/generate/eglFunctionList.py \
diff --git a/src/gallium/auxiliary/Makefile.am b/src/gallium/auxiliary/Makefile.am
index d7d803a961c..4bfa7648389 100644
--- a/src/gallium/auxiliary/Makefile.am
+++ b/src/gallium/auxiliary/Makefile.am
@@ -54,7 +54,7 @@ libgallium_la_SOURCES += \
endif
MKDIR_GEN = $(AM_V_at)$(MKDIR_P) $(@D)
-PYTHON_GEN = $(AM_V_GEN)$(PYTHON) $(PYTHON_FLAGS)
+PYTHON_GEN = $(AM_V_GEN)$(PYTHON2) $(PYTHON_FLAGS)
indices/u_indices_gen.c: indices/u_indices_gen.py
$(MKDIR_GEN)
diff --git a/src/gallium/drivers/freedreno/Makefile.am b/src/gallium/drivers/freedreno/Makefile.am
index 67095de6e0f..c19b776892c 100644
--- a/src/gallium/drivers/freedreno/Makefile.am
+++ b/src/gallium/drivers/freedreno/Makefile.am
@@ -12,7 +12,7 @@ AM_CFLAGS = \
MKDIR_GEN = $(AM_V_at)$(MKDIR_P) $(@D)
ir3/ir3_nir_trig.c: ir3/ir3_nir_trig.py $(top_srcdir)/src/compiler/nir/nir_algebraic.py
$(MKDIR_GEN)
- $(AM_V_GEN) $(PYTHON) $(PYTHON_FLAGS) $(srcdir)/ir3/ir3_nir_trig.py -p $(top_srcdir)/src/compiler/nir > $@ || ($(RM) $@; false)
+ $(AM_V_GEN) $(PYTHON2) $(PYTHON_FLAGS) $(srcdir)/ir3/ir3_nir_trig.py -p $(top_srcdir)/src/compiler/nir > $@ || ($(RM) $@; false)
noinst_LTLIBRARIES = libfreedreno.la
diff --git a/src/gallium/drivers/r600/Makefile.am b/src/gallium/drivers/r600/Makefile.am
index c5b41cce26e..1138de985dd 100644
--- a/src/gallium/drivers/r600/Makefile.am
+++ b/src/gallium/drivers/r600/Makefile.am
@@ -3,7 +3,7 @@ include $(top_srcdir)/src/gallium/Automake.inc
egd_tables.h: $(srcdir)/egd_tables.py $(srcdir)/evergreend.h
$(AM_V_at)$(MKDIR_P) $(@D)
- $(AM_V_GEN) $(PYTHON) $(srcdir)/egd_tables.py $(srcdir)/evergreend.h > $@
+ $(AM_V_GEN) $(PYTHON2) $(srcdir)/egd_tables.py $(srcdir)/evergreend.h > $@
BUILT_SOURCES = $(R600_GENERATED_FILES)
AM_CFLAGS = \
diff --git a/src/gallium/drivers/radeonsi/Makefile.am b/src/gallium/drivers/radeonsi/Makefile.am
index 317ae7ea19f..62b877d4ea4 100644
--- a/src/gallium/drivers/radeonsi/Makefile.am
+++ b/src/gallium/drivers/radeonsi/Makefile.am
@@ -48,7 +48,7 @@ GEN_DRIINFO_INPUTS = \
$(top_srcdir)/src/gallium/auxiliary/pipe-loader/driinfo_gallium.h \
$(srcdir)/driinfo_radeonsi.h
-PYTHON_GEN = $(AM_V_GEN)$(PYTHON) $(PYTHON_FLAGS)
+PYTHON_GEN = $(AM_V_GEN)$(PYTHON2) $(PYTHON_FLAGS)
MERGE_DRIINFO = $(top_srcdir)/src/util/merge_driinfo.py
si_driinfo.h: $(MERGE_DRIINFO) $(GEN_DRIINFO_INPUTS)
diff --git a/src/gallium/drivers/swr/Makefile.am b/src/gallium/drivers/swr/Makefile.am
index 3390ef6b096..d20a6bdbed3 100644
--- a/src/gallium/drivers/swr/Makefile.am
+++ b/src/gallium/drivers/swr/Makefile.am
@@ -98,7 +98,7 @@ BUILT_SOURCES = \
rasterizer/core/backends/gen_rasterizer.hpp
MKDIR_GEN = $(AM_V_at)$(MKDIR_P) $(@D)
-PYTHON_GEN = $(AM_V_GEN)$(PYTHON) $(PYTHON_FLAGS)
+PYTHON_GEN = $(AM_V_GEN)$(PYTHON2) $(PYTHON_FLAGS)
gen_swr_context_llvm.h: rasterizer/codegen/gen_llvm_types.py rasterizer/codegen/templates/gen_llvm.hpp swr_context.h
$(PYTHON_GEN) \
$(srcdir)/rasterizer/codegen/gen_llvm_types.py \
diff --git a/src/intel/Makefile.am b/src/intel/Makefile.am
index 5a2518d8d72..95764b82da7 100644
--- a/src/intel/Makefile.am
+++ b/src/intel/Makefile.am
@@ -50,7 +50,7 @@ AM_CXXFLAGS = \
$(VISIBILITY_CXXFLAGS)
MKDIR_GEN = $(AM_V_at)$(MKDIR_P) $(@D)
-PYTHON_GEN = $(AM_V_GEN)$(PYTHON) $(PYTHON_FLAGS)
+PYTHON_GEN = $(AM_V_GEN)$(PYTHON2) $(PYTHON_FLAGS)
lib_LTLIBRARIES =
check_LTLIBRARIES =
diff --git a/src/intel/Makefile.compiler.am b/src/intel/Makefile.compiler.am
index cd7e6882fb9..46711fe71b7 100644
--- a/src/intel/Makefile.compiler.am
+++ b/src/intel/Makefile.compiler.am
@@ -35,7 +35,7 @@ BUILT_SOURCES += $(COMPILER_GENERATED_FILES)
compiler/brw_nir_trig_workarounds.c: compiler/brw_nir_trig_workarounds.py \
$(top_srcdir)/src/compiler/nir/nir_algebraic.py
$(MKDIR_GEN)
- $(AM_V_GEN) $(PYTHON) $(PYTHON_FLAGS) $(srcdir)/compiler/brw_nir_trig_workarounds.py -p $(top_srcdir)/src/compiler/nir > $@ || ($(RM) $@; false)
+ $(AM_V_GEN) $(PYTHON2) $(PYTHON_FLAGS) $(srcdir)/compiler/brw_nir_trig_workarounds.py -p $(top_srcdir)/src/compiler/nir > $@ || ($(RM) $@; false)
EXTRA_DIST += \
compiler/brw_nir_trig_workarounds.py
diff --git a/src/intel/Makefile.vulkan.am b/src/intel/Makefile.vulkan.am
index 46f22047e36..9555d98095b 100644
--- a/src/intel/Makefile.vulkan.am
+++ b/src/intel/Makefile.vulkan.am
@@ -28,7 +28,7 @@ vulkan/anv_entrypoints.c: vulkan/anv_entrypoints_gen.py \
vulkan/anv_extensions.py \
$(vulkan_api_xml)
$(MKDIR_GEN)
- $(AM_V_GEN)$(PYTHON) $(srcdir)/vulkan/anv_entrypoints_gen.py \
+ $(AM_V_GEN)$(PYTHON2) $(srcdir)/vulkan/anv_entrypoints_gen.py \
--xml $(vulkan_api_xml) \
--outdir $(builddir)/vulkan
vulkan/anv_entrypoints.h: vulkan/anv_entrypoints.c
@@ -37,7 +37,7 @@ vulkan/anv_extensions.c: vulkan/anv_extensions_gen.py \
vulkan/anv_extensions.py \
$(vulkan_api_xml)
$(MKDIR_GEN)
- $(AM_V_GEN)$(PYTHON) $(srcdir)/vulkan/anv_extensions_gen.py \
+ $(AM_V_GEN)$(PYTHON2) $(srcdir)/vulkan/anv_extensions_gen.py \
--xml $(vulkan_api_xml) \
--out-c $@
@@ -45,7 +45,7 @@ vulkan/anv_extensions.h: vulkan/anv_extensions_gen.py \
vulkan/anv_extensions.py \
$(vulkan_api_xml)
$(MKDIR_GEN)
- $(AM_V_GEN)$(PYTHON) $(srcdir)/vulkan/anv_extensions_gen.py \
+ $(AM_V_GEN)$(PYTHON2) $(srcdir)/vulkan/anv_extensions_gen.py \
--xml $(vulkan_api_xml) \
--out-h $@
@@ -65,12 +65,12 @@ EXTRA_DIST += \
vulkan/dev_icd.json : vulkan/anv_extensions.py vulkan/anv_icd.py
$(MKDIR_GEN)
- $(AM_V_GEN)$(PYTHON) $(srcdir)/vulkan/anv_icd.py \
+ $(AM_V_GEN)$(PYTHON2) $(srcdir)/vulkan/anv_icd.py \
--lib-path="${abs_top_builddir}/${LIB_DIR}" --out $@
vulkan/intel_icd.@host_cpu@.json : vulkan/anv_extensions.py vulkan/anv_icd.py
$(MKDIR_GEN)
- $(AM_V_GEN)$(PYTHON) $(srcdir)/vulkan/anv_icd.py \
+ $(AM_V_GEN)$(PYTHON2) $(srcdir)/vulkan/anv_icd.py \
--lib-path="${libdir}" --out $@
if HAVE_INTEL_VULKAN
diff --git a/src/mapi/Makefile.am b/src/mapi/Makefile.am
index 97ebdeb1d7f..3da1a193d28 100644
--- a/src/mapi/Makefile.am
+++ b/src/mapi/Makefile.am
@@ -59,7 +59,7 @@ AM_CPPFLAGS = \
include Makefile.sources
MKDIR_GEN = $(AM_V_at)$(MKDIR_P) $(@D)
-PYTHON_GEN = $(AM_V_GEN)$(PYTHON) $(PYTHON_FLAGS)
+PYTHON_GEN = $(AM_V_GEN)$(PYTHON2) $(PYTHON_FLAGS)
glapi_gen_mapi_deps := \
mapi_abi.py \
diff --git a/src/mapi/glapi/gen/Makefile.am b/src/mapi/glapi/gen/Makefile.am
index 7a80f266260..93acabd968b 100644
--- a/src/mapi/glapi/gen/Makefile.am
+++ b/src/mapi/glapi/gen/Makefile.am
@@ -233,7 +233,7 @@ COMMON = $(API_XML) \
COMMON_GLX = $(COMMON) glX_API.xml glX_XML.py glX_proto_common.py
-PYTHON_GEN = $(AM_V_GEN)$(PYTHON) $(PYTHON_FLAGS)
+PYTHON_GEN = $(AM_V_GEN)$(PYTHON2) $(PYTHON_FLAGS)
######################################################################
diff --git a/src/mesa/Makefile.am b/src/mesa/Makefile.am
index d7daa995c5c..195e4400355 100644
--- a/src/mesa/Makefile.am
+++ b/src/mesa/Makefile.am
@@ -73,7 +73,7 @@ CLEANFILES = \
$(BUILT_SOURCES) \
program/program_parse.tab.h
-PYTHON_GEN = $(AM_V_GEN)$(PYTHON) $(PYTHON_FLAGS)
+PYTHON_GEN = $(AM_V_GEN)$(PYTHON2) $(PYTHON_FLAGS)
main/get_hash.h: ../mapi/glapi/gen/gl_and_es_API.xml main/get_hash_params.py \
main/get_hash_generator.py
diff --git a/src/mesa/drivers/dri/i965/Makefile.am b/src/mesa/drivers/dri/i965/Makefile.am
index b6fff47abe9..889d4c68a2b 100644
--- a/src/mesa/drivers/dri/i965/Makefile.am
+++ b/src/mesa/drivers/dri/i965/Makefile.am
@@ -115,7 +115,7 @@ EXTRA_DIST = \
meson.build
brw_oa_metrics.c: brw_oa.py $(i965_oa_xml_FILES)
- $(PYTHON) $(PYTHON_FLAGS) $(srcdir)/brw_oa.py \
+ $(PYTHON2) $(PYTHON_FLAGS) $(srcdir)/brw_oa.py \
--code=$(builddir)/brw_oa_metrics.c \
--header=$(builddir)/brw_oa_metrics.h \
$(i965_oa_xml_FILES:%=$(srcdir)/%)
diff --git a/src/util/Makefile.am b/src/util/Makefile.am
index 7dedaab9fc7..efb94caff71 100644
--- a/src/util/Makefile.am
+++ b/src/util/Makefile.am
@@ -93,7 +93,7 @@ EXTRA_DIST = \
sha1/README \
meson.build
-PYTHON_GEN = $(AM_V_GEN)$(PYTHON) $(PYTHON_FLAGS)
+PYTHON_GEN = $(AM_V_GEN)$(PYTHON2) $(PYTHON_FLAGS)
format_srgb.c: format_srgb.py
$(PYTHON_GEN) $(srcdir)/format_srgb.py > $@
diff --git a/src/util/xmlpool/Makefile.am b/src/util/xmlpool/Makefile.am
index f5142768aa3..0ef7a5462a1 100644
--- a/src/util/xmlpool/Makefile.am
+++ b/src/util/xmlpool/Makefile.am
@@ -70,7 +70,7 @@ CLEANFILES = \
# Default target options.h
LOCALEDIR := .
options.h: t_options.h $(MOS)
- $(AM_V_GEN) $(PYTHON) $(PYTHON_FLAGS) $(srcdir)/gen_xmlpool.py $(srcdir)/t_options.h $(LOCALEDIR) $(LANGS) > options.h
+ $(AM_V_GEN) $(PYTHON2) $(PYTHON_FLAGS) $(srcdir)/gen_xmlpool.py $(srcdir)/t_options.h $(LOCALEDIR) $(LANGS) > options.h
# Update .mo files from the corresponding .po files.
%/LC_MESSAGES/options.mo: %.po
diff --git a/src/vulkan/Makefile.am b/src/vulkan/Makefile.am
index dc7e32aaa68..db3831229e9 100644
--- a/src/vulkan/Makefile.am
+++ b/src/vulkan/Makefile.am
@@ -6,7 +6,7 @@ vulkan_includedir = $(includedir)/vulkan
vulkan_api_xml = $(top_srcdir)/src/vulkan/registry/vk.xml
MKDIR_GEN = $(AM_V_at)$(MKDIR_P) $(@D)
-PYTHON_GEN = $(AM_V_GEN)$(PYTHON) $(PYTHON_FLAGS)
+PYTHON_GEN = $(AM_V_GEN)$(PYTHON2) $(PYTHON_FLAGS)
EXTRA_DIST = \
util/gen_enum_to_str.py \