[Mesa-dev] [PATCH 26/26] meson: Build with Python 3

Mathieu Bridon bochecha at daitauha.fr
Thu Jul 5 13:17:57 UTC 2018


Now that all the build scripts are compatible with both Python 2 and 3,
we can flip the switch and tell Meson to use the latter.

Since Meson already depends on Python 3 anyway, this means we don't need
two different Python stacks to build Mesa.

Signed-off-by: Mathieu Bridon <bochecha at daitauha.fr>
---
 meson.build                                   |  6 ++---
 src/amd/common/meson.build                    |  2 +-
 src/amd/vulkan/meson.build                    | 10 +++----
 src/broadcom/cle/meson.build                  |  4 +--
 src/compiler/glsl/meson.build                 |  4 +--
 src/compiler/meson.build                      |  2 +-
 src/compiler/nir/meson.build                  | 14 +++++-----
 src/compiler/spirv/meson.build                |  4 +--
 src/egl/meson.build                           |  4 +--
 src/gallium/auxiliary/meson.build             |  6 ++---
 src/gallium/drivers/freedreno/meson.build     |  2 +-
 src/gallium/drivers/r600/meson.build          |  2 +-
 src/gallium/drivers/radeonsi/meson.build      |  2 +-
 .../swr/rasterizer/codegen/meson.build        |  8 +++---
 .../swr/rasterizer/core/backends/meson.build  |  4 +--
 .../drivers/swr/rasterizer/jitter/meson.build |  6 ++---
 src/intel/compiler/meson.build                |  2 +-
 src/intel/genxml/meson.build                  |  6 ++---
 src/intel/isl/meson.build                     |  2 +-
 src/intel/vulkan/meson.build                  | 10 +++----
 src/mapi/es1api/meson.build                   |  2 +-
 src/mapi/es2api/meson.build                   |  2 +-
 src/mapi/glapi/gen/meson.build                | 26 +++++++++----------
 src/mapi/shared-glapi/meson.build             |  2 +-
 src/mesa/drivers/dri/i965/meson.build         |  2 +-
 src/mesa/main/meson.build                     |  6 ++---
 src/mesa/meson.build                          |  6 ++---
 src/meson.build                               |  2 +-
 src/util/meson.build                          |  2 +-
 src/util/xmlpool/meson.build                  |  2 +-
 src/vulkan/util/meson.build                   |  2 +-
 31 files changed, 77 insertions(+), 77 deletions(-)

diff --git a/meson.build b/meson.build
index b2722c71e5..1b41373793 100644
--- a/meson.build
+++ b/meson.build
@@ -693,10 +693,10 @@ if with_platform_haiku
   pre_args += '-DHAVE_HAIKU_PLATFORM'
 endif
 
-prog_python2 = find_program('python2')
-has_mako = run_command(prog_python2, '-c', 'import mako')
+prog_python = find_program('python3')
+has_mako = run_command(prog_python, '-c', 'import mako')
 if has_mako.returncode() != 0
-  error('Python (2.x) mako module required to build mesa.')
+  error('Python (3.x) mako module required to build mesa.')
 endif
 
 if cc.get_id() == 'gcc' and cc.version().version_compare('< 4.4.6')
diff --git a/src/amd/common/meson.build b/src/amd/common/meson.build
index 0967b1adb7..6827a02094 100644
--- a/src/amd/common/meson.build
+++ b/src/amd/common/meson.build
@@ -22,7 +22,7 @@ sid_tables_h = custom_target(
   'sid_tables_h',
   input : ['sid_tables.py', 'sid.h', 'gfx9d.h'],
   output : 'sid_tables.h',
-  command : [prog_python2, '@INPUT@'],
+  command : [prog_python, '@INPUT@'],
   capture : true,
 )
 
diff --git a/src/amd/vulkan/meson.build b/src/amd/vulkan/meson.build
index 22857926fa..c5c9b308c6 100644
--- a/src/amd/vulkan/meson.build
+++ b/src/amd/vulkan/meson.build
@@ -23,7 +23,7 @@ radv_entrypoints = custom_target(
   input : ['radv_entrypoints_gen.py', vk_api_xml],
   output : ['radv_entrypoints.h', 'radv_entrypoints.c'],
   command : [
-    prog_python2, '@INPUT0@', '--xml', '@INPUT1@', '--outdir',
+    prog_python, '@INPUT0@', '--xml', '@INPUT1@', '--outdir',
     meson.current_build_dir()
   ],
   depend_files : files('radv_extensions.py'),
@@ -34,7 +34,7 @@ radv_extensions_c = custom_target(
   input : ['radv_extensions.py', vk_api_xml],
   output : ['radv_extensions.c', 'radv_extensions.h'],
   command : [
-    prog_python2, '@INPUT0@', '--xml', '@INPUT1@', '--out-c', '@OUTPUT0@',
+    prog_python, '@INPUT0@', '--xml', '@INPUT1@', '--out-c', '@OUTPUT0@',
     '--out-h', '@OUTPUT1@'
   ],
 )
@@ -43,7 +43,7 @@ vk_format_table_c = custom_target(
   'vk_format_table.c',
   input : ['vk_format_table.py', 'vk_format_layout.csv'],
   output : 'vk_format_table.c',
-  command : [prog_python2, '@INPUT@'],
+  command : [prog_python, '@INPUT@'],
   depend_files : files('vk_format_parse.py'),
   capture : true,
 )
@@ -151,7 +151,7 @@ radeon_icd = custom_target(
   input : 'radv_icd.py',
   output : 'radeon_icd. at 0@.json'.format(host_machine.cpu()),
   command : [
-    prog_python2, '@INPUT@',
+    prog_python, '@INPUT@',
     '--lib-path', join_paths(get_option('prefix'), get_option('libdir')),
     '--out', '@OUTPUT@',
   ],
@@ -166,7 +166,7 @@ radv_dev_icd = custom_target(
   input : 'radv_icd.py',
   output : 'dev_icd.json',
   command : [
-    prog_python2, '@INPUT@', '--lib-path', meson.current_build_dir(),
+    prog_python, '@INPUT@', '--lib-path', meson.current_build_dir(),
     '--out', '@OUTPUT@'
   ],
   depend_files : files('radv_extensions.py'),
diff --git a/src/broadcom/cle/meson.build b/src/broadcom/cle/meson.build
index 983896737a..afaf5a1b4f 100644
--- a/src/broadcom/cle/meson.build
+++ b/src/broadcom/cle/meson.build
@@ -40,7 +40,7 @@ foreach _v : v3d_versions
     _name,
     input : ['gen_pack_header.py', f],
     output : _name,
-    command : [prog_python2, '@INPUT@', '@0@'.format(v)],
+    command : [prog_python, '@INPUT@', '@0@'.format(v)],
     capture : true,
   )
 endforeach
@@ -49,7 +49,7 @@ v3d_xml_h = custom_target(
   'v3d_xml.h',
   input : ['../../intel/genxml/gen_zipped_file.py', v3d_xml_files],
   output : 'v3d_xml.h',
-  command : [prog_python2, '@INPUT@'],
+  command : [prog_python, '@INPUT@'],
   capture : true,
 )
 
diff --git a/src/compiler/glsl/meson.build b/src/compiler/glsl/meson.build
index 96536b8016..5c5aa5840e 100644
--- a/src/compiler/glsl/meson.build
+++ b/src/compiler/glsl/meson.build
@@ -41,7 +41,7 @@ ir_expression_operation_constant_h = custom_target(
   'ir_expression_operation_constant.h',
   input : 'ir_expression_operation.py',
   output : 'ir_expression_operation_constant.h',
-  command : [prog_python2, '@INPUT@', 'constant'],
+  command : [prog_python, '@INPUT@', 'constant'],
   capture : true,
 )
 
@@ -49,7 +49,7 @@ ir_expression_operation_strings_h = custom_target(
   'ir_expression_operation_strings.h',
   input : 'ir_expression_operation.py',
   output : 'ir_expression_operation_strings.h',
-  command : [prog_python2, '@INPUT@', 'strings'],
+  command : [prog_python, '@INPUT@', 'strings'],
   capture : true,
 )
 
diff --git a/src/compiler/meson.build b/src/compiler/meson.build
index 60b633832d..0f8f3c1296 100644
--- a/src/compiler/meson.build
+++ b/src/compiler/meson.build
@@ -40,7 +40,7 @@ ir_expression_operation_h = custom_target(
   'ir_expression_operation.h',
   input : 'glsl/ir_expression_operation.py',
   output : 'ir_expression_operation.h',
-  command : [prog_python2, '@INPUT@', 'enum'],
+  command : [prog_python, '@INPUT@', 'enum'],
   capture : true,
 )
 
diff --git a/src/compiler/nir/meson.build b/src/compiler/nir/meson.build
index 28aa8de701..e2ae2f6af1 100644
--- a/src/compiler/nir/meson.build
+++ b/src/compiler/nir/meson.build
@@ -24,7 +24,7 @@ nir_builder_opcodes_h = custom_target(
   'nir_builder_opcodes.h',
   input : 'nir_builder_opcodes_h.py',
   output : 'nir_builder_opcodes.h',
-  command : [prog_python2, '@INPUT@'],
+  command : [prog_python, '@INPUT@'],
   capture : true,
   depend_files : nir_depends,
 )
@@ -33,7 +33,7 @@ nir_constant_expressions_c = custom_target(
   'nir_constant_expressions.c',
   input : 'nir_constant_expressions.py',
   output : 'nir_constant_expressions.c',
-  command : [prog_python2, '@INPUT@'],
+  command : [prog_python, '@INPUT@'],
   capture : true,
   depend_files : nir_depends,
 )
@@ -42,7 +42,7 @@ nir_opcodes_h = custom_target(
   'nir_opcodes.h',
   input : 'nir_opcodes_h.py',
   output : 'nir_opcodes.h',
-  command : [prog_python2, '@INPUT@'],
+  command : [prog_python, '@INPUT@'],
   capture : true,
   depend_files : nir_depends,
 )
@@ -51,7 +51,7 @@ nir_opcodes_c = custom_target(
   'nir_opcodes.c',
   input : 'nir_opcodes_c.py',
   output : 'nir_opcodes.c',
-  command : [prog_python2, '@INPUT@'],
+  command : [prog_python, '@INPUT@'],
   capture : true,
   depend_files : nir_depends,
 )
@@ -60,7 +60,7 @@ nir_opt_algebraic_c = custom_target(
   'nir_opt_algebraic.c',
   input : 'nir_opt_algebraic.py',
   output : 'nir_opt_algebraic.c',
-  command : [prog_python2, '@INPUT@'],
+  command : [prog_python, '@INPUT@'],
   capture : true,
   depend_files : files('nir_algebraic.py'),
 )
@@ -69,7 +69,7 @@ nir_intrinsics_h = custom_target(
   'nir_intrinsics.h',
   input : 'nir_intrinsics_h.py',
   output : 'nir_intrinsics.h',
-  command : [prog_python2, '@INPUT@', '--outdir', meson.current_build_dir()],
+  command : [prog_python, '@INPUT@', '--outdir', meson.current_build_dir()],
   capture : false,
   depend_files : files('nir_intrinsics.py'),
 )
@@ -78,7 +78,7 @@ nir_intrinsics_c = custom_target(
   'nir_intrinsic.c',
   input : 'nir_intrinsics_c.py',
   output : 'nir_intrinsics.c',
-  command : [prog_python2, '@INPUT@', '--outdir', meson.current_build_dir()],
+  command : [prog_python, '@INPUT@', '--outdir', meson.current_build_dir()],
   capture: false,
   depend_files : files('nir_intrinsics.py'),
 )
diff --git a/src/compiler/spirv/meson.build b/src/compiler/spirv/meson.build
index eb0c0d554d..c91d12a27d 100644
--- a/src/compiler/spirv/meson.build
+++ b/src/compiler/spirv/meson.build
@@ -22,12 +22,12 @@ vtn_gather_types_c = custom_target(
   'vtn_gather_types.c',
   input : files('vtn_gather_types_c.py', 'spirv.core.grammar.json'),
   output : 'vtn_gather_types.c',
-  command : [prog_python2, '@INPUT0@', '@INPUT1@', '@OUTPUT@'],
+  command : [prog_python, '@INPUT0@', '@INPUT1@', '@OUTPUT@'],
 )
 
 spirv_info_c = custom_target(
   'spirv_info.c',
   input : files('spirv_info_c.py', 'spirv.core.grammar.json'),
   output : 'spirv_info.c',
-  command : [prog_python2, '@INPUT0@', '@INPUT1@', '@OUTPUT@'],
+  command : [prog_python, '@INPUT0@', '@INPUT1@', '@OUTPUT@'],
 )
diff --git a/src/egl/meson.build b/src/egl/meson.build
index 5f30bbba89..5e7a1cdf15 100644
--- a/src/egl/meson.build
+++ b/src/egl/meson.build
@@ -65,7 +65,7 @@ g_egldispatchstubs_c = custom_target(
   ],
   output : 'g_egldispatchstubs.c',
   command : [
-    prog_python2, '@INPUT0@', 'source', '@INPUT1@', '@INPUT2@', '@INPUT3@'
+    prog_python, '@INPUT0@', 'source', '@INPUT1@', '@INPUT2@', '@INPUT3@'
   ],
   depend_files : files('generate/genCommon.py'),
   capture : true,
@@ -79,7 +79,7 @@ g_egldispatchstubs_h = custom_target(
   ],
   output : 'g_egldispatchstubs.h',
   command : [
-    prog_python2, '@INPUT0@', 'header', '@INPUT1@', '@INPUT2@', '@INPUT3@'
+    prog_python, '@INPUT0@', 'header', '@INPUT1@', '@INPUT2@', '@INPUT3@'
   ],
   depend_files : files('generate/genCommon.py'),
   capture : true,
diff --git a/src/gallium/auxiliary/meson.build b/src/gallium/auxiliary/meson.build
index 98542d7ef3..858c9d0c79 100644
--- a/src/gallium/auxiliary/meson.build
+++ b/src/gallium/auxiliary/meson.build
@@ -504,7 +504,7 @@ u_indices_gen_c = custom_target(
   'u_indices_gen.c',
   input : 'indices/u_indices_gen.py',
   output : 'u_indices_gen.c',
-  command : [prog_python2, '@INPUT@'],
+  command : [prog_python, '@INPUT@'],
   capture : true,
 )
 
@@ -512,7 +512,7 @@ u_unfilled_gen_c = custom_target(
   'u_unfilled_gen.c',
   input : 'indices/u_unfilled_gen.py',
   output : 'u_unfilled_gen.c',
-  command : [prog_python2, '@INPUT@'],
+  command : [prog_python, '@INPUT@'],
   capture : true,
 )
 
@@ -520,7 +520,7 @@ u_format_table_c = custom_target(
   'u_format_table.c',
   input : ['util/u_format_table.py', 'util/u_format.csv'],
   output : 'u_format_table.c',
-  command : [prog_python2, '@INPUT@'],
+  command : [prog_python, '@INPUT@'],
   depend_files : files('util/u_format_pack.py', 'util/u_format_parse.py'),
   capture : true,
 )
diff --git a/src/gallium/drivers/freedreno/meson.build b/src/gallium/drivers/freedreno/meson.build
index ba1a21c9e0..5c2ded2f72 100644
--- a/src/gallium/drivers/freedreno/meson.build
+++ b/src/gallium/drivers/freedreno/meson.build
@@ -23,7 +23,7 @@ ir3_nir_trig_c = custom_target(
   input : 'ir3/ir3_nir_trig.py',
   output : 'ir3_nir_trig.c',
   command : [
-    prog_python2, '@INPUT@',
+    prog_python, '@INPUT@',
     '-p', join_paths(meson.source_root(), 'src/compiler/nir/'),
   ],
   capture : true,
diff --git a/src/gallium/drivers/r600/meson.build b/src/gallium/drivers/r600/meson.build
index 5899518a2e..4f10994d6b 100644
--- a/src/gallium/drivers/r600/meson.build
+++ b/src/gallium/drivers/r600/meson.build
@@ -109,7 +109,7 @@ egd_tables_h = custom_target(
   'egd_tables.h',
   input : ['egd_tables.py', 'evergreend.h'],
   output : 'egd_tables.h',
-  command : [prog_python2, '@INPUT@'],
+  command : [prog_python, '@INPUT@'],
   capture : true,
 )
 
diff --git a/src/gallium/drivers/radeonsi/meson.build b/src/gallium/drivers/radeonsi/meson.build
index 90498398f3..4480faa838 100644
--- a/src/gallium/drivers/radeonsi/meson.build
+++ b/src/gallium/drivers/radeonsi/meson.build
@@ -90,7 +90,7 @@ si_driinfo_h = custom_target(
     '../../auxiliary/pipe-loader/driinfo_gallium.h', 'driinfo_radeonsi.h'
   ),
   output : 'si_driinfo.h',
-  command : [prog_python2, '@INPUT@'],
+  command : [prog_python, '@INPUT@'],
   capture : true,
 )
 
diff --git a/src/gallium/drivers/swr/rasterizer/codegen/meson.build b/src/gallium/drivers/swr/rasterizer/codegen/meson.build
index 841540e0f3..2827517602 100644
--- a/src/gallium/drivers/swr/rasterizer/codegen/meson.build
+++ b/src/gallium/drivers/swr/rasterizer/codegen/meson.build
@@ -22,7 +22,7 @@ gen_knobs_cpp = custom_target(
   'gen_knobs.cpp',
   input : ['gen_knobs.py'],
   output : 'gen_knobs.cpp',
-  command : [prog_python2, '@INPUT0@', '--output', '@OUTPUT@', '--gen_cpp'],
+  command : [prog_python, '@INPUT0@', '--output', '@OUTPUT@', '--gen_cpp'],
   depend_files : files(
     'knob_defs.py', 'gen_common.py',
     'templates/gen_knobs.cpp',
@@ -33,7 +33,7 @@ gen_knobs_h = custom_target(
   'gen_knobs.h',
   input : ['gen_knobs.py'],
   output : 'gen_knobs.h',
-  command : [prog_python2, '@INPUT0@', '--output', '@OUTPUT@', '--gen_h'],
+  command : [prog_python, '@INPUT0@', '--output', '@OUTPUT@', '--gen_h'],
   depend_files : files(
     'knob_defs.py', 'gen_common.py',
     'templates/gen_knobs.h',
@@ -53,7 +53,7 @@ foreach x : [[swr_context_files, 'gen_swr_context_llvm.h'],
     x[1],
     input : ['gen_llvm_types.py', x[0]],
     output : x[1],
-    command : [prog_python2, '@INPUT0@', '--input', '@INPUT1@', '--output', '@OUTPUT@'],
+    command : [prog_python, '@INPUT0@', '--input', '@INPUT1@', '--output', '@OUTPUT@'],
     depend_files : files(
       'templates/gen_llvm.hpp',
       'gen_common.py',
@@ -70,7 +70,7 @@ foreach x : [['gen_ar_event.hpp', '--gen_event_hpp'],
     input : ['gen_archrast.py', swr_event_proto_files, swr_event_pproto_files],
     output : x[0],
     command : [
-      prog_python2,
+      prog_python,
       '@INPUT0@',
       '--proto', '@INPUT1@',
       '--proto_private', '@INPUT2@',
diff --git a/src/gallium/drivers/swr/rasterizer/core/backends/meson.build b/src/gallium/drivers/swr/rasterizer/core/backends/meson.build
index 80b62174a6..d64715dc8b 100644
--- a/src/gallium/drivers/swr/rasterizer/core/backends/meson.build
+++ b/src/gallium/drivers/swr/rasterizer/core/backends/meson.build
@@ -28,7 +28,7 @@ files_swr_common += custom_target(
     'gen_BackendPixelRate.hpp',
   ],
   command : [
-    prog_python2, '@INPUT@',
+    prog_python, '@INPUT@',
     '--outdir', '@OUTDIR@',
     '--dim', '5', '2', '3', '2', '2', '2',
     '--numfiles', '4',
@@ -46,7 +46,7 @@ files_swr_common += custom_target(
     'gen_rasterizer.hpp',
   ],
   command : [
-    prog_python2, '@INPUT@',
+    prog_python, '@INPUT@',
     '--outdir', '@OUTDIR@',
     '--rast',
     '--dim', '5', '2', '2', '3', '5', '2',
diff --git a/src/gallium/drivers/swr/rasterizer/jitter/meson.build b/src/gallium/drivers/swr/rasterizer/jitter/meson.build
index 5c201990b5..aced4a1b73 100644
--- a/src/gallium/drivers/swr/rasterizer/jitter/meson.build
+++ b/src/gallium/drivers/swr/rasterizer/jitter/meson.build
@@ -30,7 +30,7 @@ gen_builder_hpp = custom_target(
   ],
   output : 'gen_builder.hpp',
   command : [
-    prog_python2, '@INPUT0@', '--input', '@INPUT1@', '--output', '@OUTPUT@',
+    prog_python, '@INPUT0@', '--input', '@INPUT1@', '--output', '@OUTPUT@',
     '--gen_h', '--output-dir', '@OUTDIR@'
   ],
   depend_files : swr_gen_builder_depends,
@@ -42,7 +42,7 @@ gen_builder_meta_hpp = custom_target(
   input : '../codegen/gen_llvm_ir_macros.py',
   output : 'gen_builder_meta.hpp',
   command : [
-    prog_python2, '@INPUT0@', '--gen_meta_h', '--output', '@OUTPUT@',
+    prog_python, '@INPUT0@', '--gen_meta_h', '--output', '@OUTPUT@',
     '--output-dir', '@OUTDIR@'
   ],
   depend_files : swr_gen_builder_depends,
@@ -53,7 +53,7 @@ gen_builder_intrin_hpp = custom_target(
   input : '../codegen/gen_llvm_ir_macros.py',
   output : 'gen_builder_intrin.hpp',
   command : [
-    prog_python2, '@INPUT0@', '--gen_intrin_h', '--output', '@OUTPUT@',
+    prog_python, '@INPUT0@', '--gen_intrin_h', '--output', '@OUTPUT@',
     '--output-dir', '@OUTDIR@'
   ],
   depend_files : swr_gen_builder_depends,
diff --git a/src/intel/compiler/meson.build b/src/intel/compiler/meson.build
index 72b7a6796c..98860c9437 100644
--- a/src/intel/compiler/meson.build
+++ b/src/intel/compiler/meson.build
@@ -122,7 +122,7 @@ brw_nir_trig = custom_target(
   input : 'brw_nir_trig_workarounds.py',
   output : 'brw_nir_trig_workarounds.c',
   command : [
-    prog_python2, '@INPUT@',
+    prog_python, '@INPUT@',
     '-p', join_paths(meson.source_root(), 'src/compiler/nir/'),
   ],
   depend_files : nir_algebraic_py,
diff --git a/src/intel/genxml/meson.build b/src/intel/genxml/meson.build
index 970d565471..d0c982d0f8 100644
--- a/src/intel/genxml/meson.build
+++ b/src/intel/genxml/meson.build
@@ -35,7 +35,7 @@ genX_xml_h = custom_target(
   'genX_xml.h',
   input : ['gen_zipped_file.py', gen_xml_files],
   output : 'genX_xml.h',
-  command : [prog_python2, '@INPUT@'],
+  command : [prog_python, '@INPUT@'],
   capture : true,
 )
 
@@ -43,7 +43,7 @@ genX_bits_h = custom_target(
   'genX_bits.h',
   input : ['gen_bits_header.py', gen_xml_files],
   output : 'genX_bits.h',
-  command : [prog_python2, '@INPUT@', '-o', '@OUTPUT@'],
+  command : [prog_python, '@INPUT@', '-o', '@OUTPUT@'],
 )
 
 gen_xml_pack = []
@@ -53,7 +53,7 @@ foreach f : gen_xml_files
     _name,
     input : ['gen_pack_header.py', f],
     output : _name,
-    command : [prog_python2, '@INPUT@'],
+    command : [prog_python, '@INPUT@'],
     capture : true,
   )
 endforeach
diff --git a/src/intel/isl/meson.build b/src/intel/isl/meson.build
index 5b57188d30..62cde190e6 100644
--- a/src/intel/isl/meson.build
+++ b/src/intel/isl/meson.build
@@ -66,7 +66,7 @@ isl_format_layout_c = custom_target(
   'isl_format_layout.c',
   input : ['gen_format_layout.py', 'isl_format_layout.csv'],
   output : 'isl_format_layout.c',
-  command : [prog_python2, '@INPUT0@', '--csv', '@INPUT1@', '--out', '@OUTPUT@'],
+  command : [prog_python, '@INPUT0@', '--csv', '@INPUT1@', '--out', '@OUTPUT@'],
 )
 
 libisl_files = files(
diff --git a/src/intel/vulkan/meson.build b/src/intel/vulkan/meson.build
index e427c7471f..e11bcb0c69 100644
--- a/src/intel/vulkan/meson.build
+++ b/src/intel/vulkan/meson.build
@@ -25,7 +25,7 @@ anv_entrypoints = custom_target(
   input : ['anv_entrypoints_gen.py', vk_api_xml],
   output : ['anv_entrypoints.h', 'anv_entrypoints.c'],
   command : [
-    prog_python2, '@INPUT0@', '--xml', '@INPUT1@',
+    prog_python, '@INPUT0@', '--xml', '@INPUT1@',
     '--outdir', meson.current_build_dir(),
   ],
   depend_files : anv_extensions_py,
@@ -36,7 +36,7 @@ anv_extensions_c = custom_target(
   input : ['anv_extensions_gen.py', vk_api_xml],
   output : 'anv_extensions.c',
   command : [
-    prog_python2, '@INPUT0@', '--xml', '@INPUT1@',
+    prog_python, '@INPUT0@', '--xml', '@INPUT1@',
     '--out-c', '@OUTPUT@',
   ],
   depend_files : anv_extensions_py,
@@ -47,7 +47,7 @@ anv_extensions_h = custom_target(
   input : ['anv_extensions_gen.py', vk_api_xml],
   output : 'anv_extensions.h',
   command : [
-    prog_python2, '@INPUT0@', '--xml', '@INPUT1@',
+    prog_python, '@INPUT0@', '--xml', '@INPUT1@',
     '--out-h', '@OUTPUT@',
   ],
   depend_files : anv_extensions_py,
@@ -58,7 +58,7 @@ intel_icd = custom_target(
   input : 'anv_icd.py',
   output : 'intel_icd. at 0@.json'.format(host_machine.cpu()),
   command : [
-    prog_python2, '@INPUT@',
+    prog_python, '@INPUT@',
     '--lib-path', join_paths(get_option('prefix'), get_option('libdir')),
     '--out', '@OUTPUT@',
   ],
@@ -73,7 +73,7 @@ dev_icd = custom_target(
   input : 'anv_icd.py',
   output : 'dev_icd. at 0@.json'.format(host_machine.cpu()),
   command : [
-    prog_python2, '@INPUT@', '--lib-path', meson.current_build_dir(),
+    prog_python, '@INPUT@', '--lib-path', meson.current_build_dir(),
     '--out', '@OUTPUT@'
   ],
   depend_files : files('anv_extensions.py'),
diff --git a/src/mapi/es1api/meson.build b/src/mapi/es1api/meson.build
index 657dc2d9ef..d8a77a41df 100644
--- a/src/mapi/es1api/meson.build
+++ b/src/mapi/es1api/meson.build
@@ -22,7 +22,7 @@ es1_glapi_mapi_tmp_h = custom_target(
   'es1_glapi_mapi_tmp.h',
   input : [mapi_abi_py, gl_and_es_api_files],
   output : 'glapi_mapi_tmp.h',
-  command : [prog_python2, '@INPUT0@', '--printer', 'es1api', '@INPUT1@'],
+  command : [prog_python, '@INPUT0@', '--printer', 'es1api', '@INPUT1@'],
   depend_files : api_xml_files,
   capture : true,
 )
diff --git a/src/mapi/es2api/meson.build b/src/mapi/es2api/meson.build
index da5198ed6e..891e6f7b27 100644
--- a/src/mapi/es2api/meson.build
+++ b/src/mapi/es2api/meson.build
@@ -22,7 +22,7 @@ es2_glapi_mapi_tmp_h = custom_target(
   'es2_glapi_mapi_tmp.h',
   input : [mapi_abi_py, gl_and_es_api_files],
   output : 'glapi_mapi_tmp.h',
-  command : [prog_python2, '@INPUT0@', '--printer', 'es2api', '@INPUT1@'],
+  command : [prog_python, '@INPUT0@', '--printer', 'es2api', '@INPUT1@'],
   depend_files : api_xml_files,
   capture : true,
 )
diff --git a/src/mapi/glapi/gen/meson.build b/src/mapi/glapi/gen/meson.build
index a6a93cc83b..b148627f71 100644
--- a/src/mapi/glapi/gen/meson.build
+++ b/src/mapi/glapi/gen/meson.build
@@ -149,7 +149,7 @@ glapi_mapi_tmp_h = custom_target(
   'glapi_mapi_tmp.h',
   input : [mapi_abi_py, 'gl_and_es_API.xml'],
   output : 'glapi_mapi_tmp.h',
-  command : [prog_python2, '@INPUT0@', '--printer', 'glapi', '@INPUT1@'],
+  command : [prog_python, '@INPUT0@', '--printer', 'glapi', '@INPUT1@'],
   depend_files : glapi_gen_depends,
   capture : true,
 )
@@ -158,7 +158,7 @@ glprocs_h = custom_target(
   'glprocs.h',
   input : ['gl_procs.py', 'gl_and_es_API.xml'],
   output : 'glprocs.h',
-  command : [prog_python2, '@INPUT0@', '-c', '-f', '@INPUT1@'],
+  command : [prog_python, '@INPUT0@', '-c', '-f', '@INPUT1@'],
   depend_files : glapi_gen_depends,
   capture : true,
 )
@@ -167,7 +167,7 @@ glapitemp_h = custom_target(
   'glapitemp.h',
   input : ['gl_apitemp.py', 'gl_and_es_API.xml'],
   output : 'glapitemp.h',
-  command : [prog_python2, '@INPUT0@', '-f', '@INPUT1@'],
+  command : [prog_python, '@INPUT0@', '-f', '@INPUT1@'],
   depend_files : glapi_gen_depends,
   capture : true,
 )
@@ -176,7 +176,7 @@ glapitable_h = custom_target(
   'glapitable.h',
   input : ['gl_table.py', 'gl_and_es_API.xml'],
   output : 'glapitable.h',
-  command : [prog_python2, '@INPUT0@', '-f', '@INPUT1@'],
+  command : [prog_python, '@INPUT0@', '-f', '@INPUT1@'],
   depend_files : glapi_gen_depends,
   capture : true,
 )
@@ -185,7 +185,7 @@ glapi_gentable_c = custom_target(
   'glapi_gentable.c',
   input : ['gl_gentable.py', 'gl_and_es_API.xml'],
   output : 'glapi_gentable.c',
-  command : [prog_python2, '@INPUT0@', '-f', '@INPUT1@'],
+  command : [prog_python, '@INPUT0@', '-f', '@INPUT1@'],
   depend_files : glapi_gen_depends,
   capture : true,
 )
@@ -194,7 +194,7 @@ main_enums_c = custom_target(
   'enums.c',
   input : ['gl_enums.py', files('../registry/gl.xml')],
   output : 'enums.c',
-  command : [prog_python2, '@INPUT0@', '-f', '@INPUT1@'],
+  command : [prog_python, '@INPUT0@', '-f', '@INPUT1@'],
   capture : true,
 )
 
@@ -202,7 +202,7 @@ main_api_exec_c = custom_target(
   'api_exec.c',
   input : ['gl_genexec.py', 'gl_and_es_API.xml'],
   output : 'api_exec.c',
-  command : [prog_python2, '@INPUT0@', '-f', '@INPUT1@'],
+  command : [prog_python, '@INPUT0@', '-f', '@INPUT1@'],
   depend_files : files('apiexec.py') + glapi_gen_depends,
   capture : true,
 )
@@ -211,7 +211,7 @@ main_marshal_generated_c = custom_target(
   'marshal_generated.c',
   input : ['gl_marshal.py', 'gl_and_es_API.xml'],
   output : 'marshal_generated.c',
-  command : [prog_python2, '@INPUT0@', '-f', '@INPUT1@'],
+  command : [prog_python, '@INPUT0@', '-f', '@INPUT1@'],
   depend_files : files('marshal_XML.py') + glapi_gen_depends,
   capture : true,
 )
@@ -223,7 +223,7 @@ foreach x : [['indirect.c', 'proto'], ['indirect.h', 'init_h'], ['indirect_init.
     x[0],
     input : ['glX_proto_send.py', 'gl_API.xml'],
     output : x[0],
-    command : [prog_python2, '@INPUT0@', '-f', '@INPUT1@', '-m', x[1]],
+    command : [prog_python, '@INPUT0@', '-f', '@INPUT1@', '-m', x[1]],
     depend_files : glx_gen_depends,
     capture : true,
   )
@@ -235,7 +235,7 @@ foreach x : [['indirect_size.h', ['-m', 'size_h', '--header-tag', '_INDIRECT_SIZ
     x[0],
     input : ['glX_proto_size.py', 'gl_API.xml'],
     output : x[0],
-    command : [prog_python2, '@INPUT0@', '-f', '@INPUT1@', '--only-set', x[1]],
+    command : [prog_python, '@INPUT0@', '-f', '@INPUT1@', '--only-set', x[1]],
     depend_files : glx_gen_depends,
     capture : true,
   )
@@ -246,7 +246,7 @@ glapi_x86_s = custom_target(
   'glapi_x86.S',
   input : ['gl_x86_asm.py', gl_and_es_api_files],
   output : 'glapi_x86.S',
-  command : [prog_python2, '@INPUT0@', '-f', '@INPUT1@'],
+  command : [prog_python, '@INPUT0@', '-f', '@INPUT1@'],
   depend_files : glapi_gen_depends,
   capture : true,
 )
@@ -255,7 +255,7 @@ glapi_x86_64_s = custom_target(
   'glapi_x86-64.S',
   input : ['gl_x86-64_asm.py', gl_and_es_api_files],
   output : 'glapi_x86-64.S',
-  command : [prog_python2, '@INPUT0@', '-f', '@INPUT1@'],
+  command : [prog_python, '@INPUT0@', '-f', '@INPUT1@'],
   depend_files : glapi_gen_depends,
   capture : true,
 )
@@ -264,7 +264,7 @@ glapi_sparc_s = custom_target(
   'glapi_sparc.S',
   input : ['gl_SPARC_asm.py', gl_and_es_api_files],
   output : 'glapi_sparc.S',
-  command : [prog_python2, '@INPUT0@', '-f', '@INPUT1@'],
+  command : [prog_python, '@INPUT0@', '-f', '@INPUT1@'],
   depend_files : glapi_gen_depends,
   capture : true,
 )
diff --git a/src/mapi/shared-glapi/meson.build b/src/mapi/shared-glapi/meson.build
index c7d136ced2..44e86f845f 100644
--- a/src/mapi/shared-glapi/meson.build
+++ b/src/mapi/shared-glapi/meson.build
@@ -31,7 +31,7 @@ shared_glapi_mapi_tmp_h = custom_target(
   'shared_glapi_mapi_tmp.h',
   input : [mapi_abi_py, gl_and_es_api_files],
   output : 'glapi_mapi_tmp.h',
-  command : [prog_python2, '@INPUT0@', '--printer', 'shared-glapi', '@INPUT1@'],
+  command : [prog_python, '@INPUT0@', '--printer', 'shared-glapi', '@INPUT1@'],
   depend_files : api_xml_files,
   capture : true,
 )
diff --git a/src/mesa/drivers/dri/i965/meson.build b/src/mesa/drivers/dri/i965/meson.build
index 761bb51d6f..6c94f4aea7 100644
--- a/src/mesa/drivers/dri/i965/meson.build
+++ b/src/mesa/drivers/dri/i965/meson.build
@@ -170,7 +170,7 @@ i965_oa_sources = custom_target(
   input : i965_hw_metrics_xml_files,
   output : [ 'brw_oa_metrics.c', 'brw_oa_metrics.h' ],
   command : [
-    prog_python2, files('brw_oa.py'),
+    prog_python, files('brw_oa.py'),
     '--code', '@OUTPUT0@', '--header', '@OUTPUT1@',
     '@INPUT@',
   ],
diff --git a/src/mesa/main/meson.build b/src/mesa/main/meson.build
index 57487fe4da..a5f0e02c6c 100644
--- a/src/mesa/main/meson.build
+++ b/src/mesa/main/meson.build
@@ -22,7 +22,7 @@ main_dispatch_h = custom_target(
   'dispatch.h',
   input : [files('../../mapi/glapi/gen/gl_table.py'), gl_and_es_api_files],
   output : 'dispatch.h',
-  command : [prog_python2, '@INPUT0@', '-f', '@INPUT1@', '-m', 'remap_table'],
+  command : [prog_python, '@INPUT0@', '-f', '@INPUT1@', '-m', 'remap_table'],
   depend_files : glapi_gen_depends,
   capture : true,
 )
@@ -31,7 +31,7 @@ main_marshal_generated_h = custom_target(
   'marshal_generated.h',
   input : [files('../../mapi/glapi/gen/gl_marshal_h.py'), gl_and_es_api_files],
   output : 'marshal_generated.h',
-  command : [prog_python2, '@INPUT0@', '-f', '@INPUT1@'],
+  command : [prog_python, '@INPUT0@', '-f', '@INPUT1@'],
   depend_files : files('../../mapi/glapi/gen/marshal_XML.py') + glapi_gen_depends,
   capture : true,
 )
@@ -40,7 +40,7 @@ main_remap_helper_h = custom_target(
   'remap_helper.h',
   input : [files('../../mapi/glapi/gen/remap_helper.py'), gl_and_es_api_files],
   output : 'remap_helper.h',
-  command : [prog_python2, '@INPUT0@', '-f', '@INPUT1@'],
+  command : [prog_python, '@INPUT0@', '-f', '@INPUT1@'],
   depend_files : glapi_gen_depends,
   capture : true,
 )
diff --git a/src/mesa/meson.build b/src/mesa/meson.build
index 8fb7db215c..ff4b46746e 100644
--- a/src/mesa/meson.build
+++ b/src/mesa/meson.build
@@ -662,7 +662,7 @@ format_fallback_c = custom_target(
   'format_fallback.c',
   input : ['main/format_fallback.py', 'main/formats.csv'],
   output : 'format_fallback.c',
-  command : [prog_python2, '@INPUT0@', '@INPUT1@', '@OUTPUT@'],
+  command : [prog_python, '@INPUT0@', '@INPUT1@', '@OUTPUT@'],
   depend_files : files('main/format_parser.py'),
 )
 
@@ -670,7 +670,7 @@ get_hash_h = custom_target(
   'get_hash.h',
   input : ['main/get_hash_generator.py', gl_and_es_api_files],
   output : 'get_hash.h',
-  command : [prog_python2, '@INPUT0@', '-f', '@INPUT1@'],
+  command : [prog_python, '@INPUT0@', '-f', '@INPUT1@'],
   depend_files : files('main/get_hash_params.py'),
   capture : true,
 )
@@ -682,7 +682,7 @@ foreach x : [['format_info.h', 'format_info.py'],
     x[0],
     input : ['main/@0@'.format(x[1]), 'main/formats.csv'],
     output : x[0],
-    command : [prog_python2, '@INPUT0@', '@INPUT1@'],
+    command : [prog_python, '@INPUT0@', '@INPUT1@'],
     depend_files : files('main/format_parser.py'),
     capture : true,
   )
diff --git a/src/meson.build b/src/meson.build
index c2566b7a68..76b347821c 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -42,7 +42,7 @@ libglsl_util = static_library(
 sha1_h = custom_target(
   'git_sha1.h',
   output : 'git_sha1.h',
-  command : [prog_python2, git_sha1_gen_py, '--output', '@OUTPUT@'],
+  command : [prog_python, git_sha1_gen_py, '--output', '@OUTPUT@'],
   build_always : true, # commit sha1 can change without having touched these files
 )
 
diff --git a/src/util/meson.build b/src/util/meson.build
index 1838719d27..f71d22018d 100644
--- a/src/util/meson.build
+++ b/src/util/meson.build
@@ -100,7 +100,7 @@ format_srgb = custom_target(
   'format_srgb',
   input : ['format_srgb.py'],
   output : 'format_srgb.c',
-  command : [prog_python2, '@INPUT0@'],
+  command : [prog_python, '@INPUT0@'],
   capture : true,
 )
 
diff --git a/src/util/xmlpool/meson.build b/src/util/xmlpool/meson.build
index 97693fac8c..346b1956a5 100644
--- a/src/util/xmlpool/meson.build
+++ b/src/util/xmlpool/meson.build
@@ -22,7 +22,7 @@ xmlpool_options_h = custom_target(
   'xmlpool_options.h',
   input : ['gen_xmlpool.py', 't_options.h'],
   output : 'options.h',
-  command : [prog_python2, '@INPUT@', meson.current_source_dir()],
+  command : [prog_python, '@INPUT@', meson.current_source_dir()],
   capture : true,
   depend_files : files('ca.po', 'es.po', 'de.po', 'nl.po', 'sv.po', 'fr.po'),
 )
diff --git a/src/vulkan/util/meson.build b/src/vulkan/util/meson.build
index 78cee0adb5..15e4ff4912 100644
--- a/src/vulkan/util/meson.build
+++ b/src/vulkan/util/meson.build
@@ -31,7 +31,7 @@ vk_enum_to_str = custom_target(
   input : ['gen_enum_to_str.py', vk_api_xml[0]],
   output : ['vk_enum_to_str.c', 'vk_enum_to_str.h'],
   command : [
-    prog_python2, '@INPUT0@', '--xml', '@INPUT1@', '--outdir',
+    prog_python, '@INPUT0@', '--xml', '@INPUT1@', '--outdir',
     meson.current_build_dir()
   ],
 )
-- 
2.17.1



More information about the mesa-dev mailing list