diff --git a/app-tools/meson.build b/app-tools/meson.build index a466cb0adc..fcdf80f7ee 100644 --- a/app-tools/meson.build +++ b/app-tools/meson.build @@ -32,9 +32,9 @@ if enable_default_bin pointing_to: fs.name(gimp_debug_tool.full_path()), install_dir: gimp_debug_tool_dir) else - meson.add_install_script('python3', '-c', 'from shutil import copy2; from pathlib import Path; from sys import argv; copy2(argv[1], str(Path(argv[2]) / "bin" / argv[3]))', + meson.add_install_script(python, '-c', 'from shutil import copy2; from pathlib import Path; from sys import argv; copy2(argv[1], str(Path(argv[2]) / "bin" / argv[3]))', gimp_debug_tool.full_path(), get_option('prefix'), fs.name(gimp_debug_tool.name()).replace(exec_ver, '.exe')) - meson.add_install_script('python3', '-c', 'from shutil import copy2; from pathlib import Path; from sys import argv; copy2(argv[1], str(Path(argv[2]) / "bin" / argv[3].replace("@0@", argv[4])))', + meson.add_install_script(python, '-c', 'from shutil import copy2; from pathlib import Path; from sys import argv; copy2(argv[1], str(Path(argv[2]) / "bin" / argv[3].replace("@0@", argv[4])))', gimp_debug_tool.full_path(), get_option('prefix'), fs.name(gimp_debug_tool.name()).replace(exec_ver, '-@0@.exe'), api_version_major.to_string()) endif endif diff --git a/app/meson.build b/app/meson.build index 47aa5f791d..dcc4c40ce8 100644 --- a/app/meson.build +++ b/app/meson.build @@ -240,9 +240,9 @@ if enable_default_bin pointing_to: fs.name(gimpmain_exe.full_path()), install_dir: get_option('bindir')) else - meson.add_install_script('python3', '-c', 'from shutil import copy2; from pathlib import Path; from sys import argv; copy2(argv[1], str(Path(argv[2]) / "bin" / argv[3]))', + meson.add_install_script(python, '-c', 'from shutil import copy2; from pathlib import Path; from sys import argv; copy2(argv[1], str(Path(argv[2]) / "bin" / argv[3]))', gimpmain_exe.full_path(), get_option('prefix'), fs.name(gimpmain_exe.name()).replace(exec_ver, '.exe')) - meson.add_install_script('python3', '-c', 'from shutil import copy2; from pathlib import Path; from sys import argv; copy2(argv[1], str(Path(argv[2]) / "bin" / argv[3].replace("@0@", argv[4])))', + meson.add_install_script(python, '-c', 'from shutil import copy2; from pathlib import Path; from sys import argv; copy2(argv[1], str(Path(argv[2]) / "bin" / argv[3].replace("@0@", argv[4])))', gimpmain_exe.full_path(), get_option('prefix'), fs.name(gimpmain_exe.name()).replace(exec_ver, '-@0@.exe'), api_version_major.to_string()) endif if enable_console_bin @@ -254,9 +254,9 @@ if enable_default_bin pointing_to: fs.name(gimpconsole_exe.full_path()), install_dir: get_option('bindir')) else - meson.add_install_script('python3', '-c', 'from shutil import copy2; from pathlib import Path; from sys import argv; copy2(argv[1], str(Path(argv[2]) / "bin" / argv[3]))', + meson.add_install_script(python, '-c', 'from shutil import copy2; from pathlib import Path; from sys import argv; copy2(argv[1], str(Path(argv[2]) / "bin" / argv[3]))', gimpconsole_exe.full_path(), get_option('prefix'), fs.name(gimpconsole_exe.name()).replace(exec_ver, '.exe')) - meson.add_install_script('python3', '-c', 'from shutil import copy2; from pathlib import Path; from sys import argv; copy2(argv[1], str(Path(argv[2]) / "bin" / argv[3].replace("@0@", argv[4])))', + meson.add_install_script(python, '-c', 'from shutil import copy2; from pathlib import Path; from sys import argv; copy2(argv[1], str(Path(argv[2]) / "bin" / argv[3].replace("@0@", argv[4])))', gimpconsole_exe.full_path(), get_option('prefix'), fs.name(gimpconsole_exe.name()).replace(exec_ver, '-@0@.exe'), api_version_major.to_string()) endif endif diff --git a/data/meson.build b/data/meson.build index 2e5eb35c77..a5ae00f1ad 100644 --- a/data/meson.build +++ b/data/meson.build @@ -8,7 +8,7 @@ subdir('tips') subdir('tool-presets') -meson.add_install_script('python3', '-c', +meson.add_install_script(python, '-c', 'from pathlib import Path; from sys import argv; Path(argv[1]).mkdir(parents=True, exist_ok=True)', get_option('prefix') / gimpdatadir / 'fonts' ) diff --git a/plug-ins/pagecurl/meson.build b/plug-ins/pagecurl/meson.build index 5643091ae8..1c44a55d39 100644 --- a/plug-ins/pagecurl/meson.build +++ b/plug-ins/pagecurl/meson.build @@ -26,7 +26,7 @@ xml_content += '\n' xml_file = configure_file( output: resourcename + '.gresource.xml', - command: [ 'python3','-c','import sys; sys.stdout.write(sys.argv[1])',xml_content ], + command: [ python,'-c','import sys; sys.stdout.write(sys.argv[1])',xml_content ], capture: true, ) diff --git a/plug-ins/screenshot/meson.build b/plug-ins/screenshot/meson.build index ac2ccf4416..0f2d02c430 100644 --- a/plug-ins/screenshot/meson.build +++ b/plug-ins/screenshot/meson.build @@ -24,7 +24,7 @@ xml_content += '\n' xml_file = configure_file( output: resourcename + '.gresource.xml', - command: [ 'python3','-c','import sys; sys.stdout.write(sys.argv[1])',xml_content ], + command: [ python,'-c','import sys; sys.stdout.write(sys.argv[1])',xml_content ], capture: true, ) diff --git a/tools/meson.build b/tools/meson.build index 1251ae59fd..b34b5cb60c 100644 --- a/tools/meson.build +++ b/tools/meson.build @@ -61,13 +61,14 @@ if enable_default_bin pointing_to: fs.name(gimp_test_clipboard.full_path()), install_dir: get_option('bindir')) else - meson.add_install_script('python3', '-c', 'from shutil import copy2; from pathlib import Path; from sys import argv; copy2(argv[1], str(Path(argv[2]) / "bin" / argv[3]))', + meson.add_install_script(python, '-c', 'from shutil import copy2; from pathlib import Path; from sys import argv; copy2(argv[1], str(Path(argv[2]) / "bin" / argv[3]))', gimptool.full_path(), get_option('prefix'), fs.name(gimptool.name()).replace(exec_ver, '.exe')) - meson.add_install_script('python3', '-c', 'from shutil import copy2; from pathlib import Path; from sys import argv; copy2(argv[1], str(Path(argv[2]) / "bin" / argv[3].replace("@0@", argv[4])))', + meson.add_install_script(python, '-c', 'from shutil import copy2; from pathlib import Path; from sys import argv; copy2(argv[1], str(Path(argv[2]) / "bin" / argv[3].replace("@0@", argv[4])))', gimptool.full_path(), get_option('prefix'), fs.name(gimptool.name()).replace(exec_ver, '-@0@.exe'), api_version_major.to_string()) - meson.add_install_script('python3', '-c', 'from shutil import copy2; from pathlib import Path; from sys import argv; copy2(argv[1], str(Path(argv[2]) / "bin" / argv[3]))', + + meson.add_install_script(python, '-c', 'from shutil import copy2; from pathlib import Path; from sys import argv; copy2(argv[1], str(Path(argv[2]) / "bin" / argv[3]))', gimp_test_clipboard.full_path(), get_option('prefix'), fs.name(gimp_test_clipboard.name()).replace(exec_ver, '.exe')) - meson.add_install_script('python3', '-c', 'from shutil import copy2; from pathlib import Path; from sys import argv; copy2(argv[1], str(Path(argv[2]) / "bin" / argv[3].replace("@0@", argv[4])))', + meson.add_install_script(python, '-c', 'from shutil import copy2; from pathlib import Path; from sys import argv; copy2(argv[1], str(Path(argv[2]) / "bin" / argv[3].replace("@0@", argv[4])))', gimp_test_clipboard.full_path(), get_option('prefix'), fs.name(gimp_test_clipboard.name()).replace(exec_ver, '-@0@.exe'), api_version_major.to_string()) endif endif