From cf07596cf6bc280dac0afff505147ca626c79453 Mon Sep 17 00:00:00 2001 From: Eli Schwartz Date: Thu, 5 May 2022 23:39:34 -0400 Subject: test cases: use best practices method to find the python3 program We do not need the python module's find_installation() for this, as this does various things to set up building and installing python modules (pure python and C-API). This functionality is already tested in the python tests. Elsewhere, when we just need an interpreter capable of running python scripts in order to guarantee a useful scripting language for custom commands, it suffices to use find_program(), which does not run an introspection script or do module imports, and is thus faster and a bit cleaner. Either way, both methods are guaranteed to find the python3 interpreter, deferring to mesonlib.python_command for that guarantee. test "71 summary" can sometimes return the python command with the ".exe" part all uppercased for mysterious Windows reasons. Smooth this over with ExternalProgram. --- test cases/java/8 codegen custom target/com/mesonbuild/meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test cases/java') diff --git a/test cases/java/8 codegen custom target/com/mesonbuild/meson.build b/test cases/java/8 codegen custom target/com/mesonbuild/meson.build index 030994154..5188f0ab2 100644 --- a/test cases/java/8 codegen custom target/com/mesonbuild/meson.build +++ b/test cases/java/8 codegen custom target/com/mesonbuild/meson.build @@ -1,4 +1,4 @@ -python = import('python').find_installation('python3') +python = find_program('python3') config_file = custom_target('confgen', input : 'Config.java.in', -- cgit v1.2.3