Merge branch 'python-interpreter' into 'main'

Use the python found by meson as the interpreter for installed scripts

Closes #3301

See merge request GNOME/glib!3982
This commit is contained in:
Philip Withnall 2024-03-26 11:06:44 +00:00
commit faf7874af3
8 changed files with 7 additions and 9 deletions

View File

@ -1,4 +1,4 @@
#!/usr/bin/env @PYTHON@
#!@PYTHON@
# GDBus - GLib D-Bus Library
#

View File

@ -14,7 +14,7 @@ gdbus_codegen_conf = configuration_data()
gdbus_codegen_conf.set('VERSION', glib_version)
gdbus_codegen_conf.set('MAJOR_VERSION', major_version)
gdbus_codegen_conf.set('MINOR_VERSION', minor_version)
gdbus_codegen_conf.set('PYTHON', python_name)
gdbus_codegen_conf.set('PYTHON', python.full_path())
gdbus_codegen_conf.set('DATADIR', glib_datadir)
# Install gdbus-codegen executable

View File

@ -1,4 +1,4 @@
#! /usr/bin/env @PYTHON@
#!@PYTHON@
# GLib Testing Framework Utility -*- Mode: python; -*-
# Copyright (C) 2007 Imendio AB
# Authors: Tim Janik

View File

@ -501,7 +501,7 @@ endif
report_conf = configuration_data()
report_conf.set('GLIB_VERSION', glib_version)
report_conf.set('PYTHON', python_name)
report_conf.set('PYTHON', python.full_path())
configure_file(
input: 'gtester-report.in',
output: 'gtester-report',

View File

@ -1,4 +1,4 @@
#!/usr/bin/env @PYTHON@
#!@PYTHON@
# pylint: disable=too-many-lines, missing-docstring, invalid-name

View File

@ -1,4 +1,4 @@
#!/usr/bin/env @PYTHON@
#!@PYTHON@
# If the code below looks horrible and unpythonic, do not panic.
#

View File

@ -87,7 +87,7 @@ python_tools = [
python_tools_conf = configuration_data()
python_tools_conf.set('VERSION', glib_version)
python_tools_conf.set('PYTHON', python_name)
python_tools_conf.set('PYTHON', python.full_path())
foreach tool: python_tools
tool_bin = configure_file(

View File

@ -2433,8 +2433,6 @@ endif
glib_conf.set('HAVE_PROC_SELF_CMDLINE', have_proc_self_cmdline)
python = import('python').find_installation(modules: ['packaging'])
# used for '#!/usr/bin/env <name>'
python_name = 'python3'
python_version = python.language_version()
python_version_req = '>=3.7'