summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorÍñigo Huguet <ihuguet@redhat.com>2024-04-02 17:14:44 +0200
committerÍñigo Huguet <inigohuguet@hotmail.com>2024-04-04 08:13:38 +0000
commitef2438414fd3937d26a76e7e822fa477817ff776 (patch)
tree12c2e08fa51b931dd61d6990d4479f5395174088
parent3b72f196945f59bd3896cce66507f8de7f607459 (diff)
meson: remove deprecated ExternalProgram.path
Replaced by full_path: https://mesonbuild.com/Reference-manual_returned_external_program.html#external_programpath ExternalProgram.full_path was added in meson 0.55 but we support meson >= 0.51. Because of that, use path or full_path conditionally depending on the meson version. This gets rid of the following deprecation warning: NOTICE: Future-deprecated features used: * 0.48.0: {'module python3'} * 0.55.0: {'ExternalProgram.path'}
-rw-r--r--man/meson.build4
-rw-r--r--meson.build40
-rw-r--r--src/libnm-client-impl/meson.build4
-rw-r--r--src/libnmc-setting/meson.build4
-rw-r--r--src/tests/client/meson.build4
5 files changed, 41 insertions, 15 deletions
diff --git a/man/meson.build b/man/meson.build
index 17287a74da..56f52bb4b3 100644
--- a/man/meson.build
+++ b/man/meson.build
@@ -70,7 +70,7 @@ if enable_introspection
input: [merge_cmd, nm_property_infos_xml[name], nm_settings_docs_xml_gir[name]],
output: 'nm-settings-docs-' + name + '.xml',
command: [
- python.path(),
+ python_path,
merge_cmd,
'@OUTPUT@',
nm_property_infos_xml[name],
@@ -84,7 +84,7 @@ if enable_introspection
input: [merge_cmd, nm_property_infos_xml[name], gen_metadata_nm_settings_nmcli_xml, nm_settings_docs_xml_gir[name]],
output: 'nm-settings-docs-' + name + '.xml',
command: [
- python.path(),
+ python_path,
merge_cmd,
'@OUTPUT@',
'--only-properties-from',
diff --git a/meson.build b/meson.build
index 1df25ca60b..88184784e6 100644
--- a/meson.build
+++ b/meson.build
@@ -571,7 +571,11 @@ if enable_ppp
if pppd_path == ''
pppd = find_program('pppd', '/sbin/pppd', '/usr/sbin/pppd', required: false)
assert(pppd.found(), 'pppd required but not found, please provide a valid pppd path or use -Dppp=false to disable it')
- pppd_path = pppd.path()
+ if meson.version().version_compare('>= 0.55')
+ pppd_path = pppd.full_path()
+ else
+ pppd_path = pppd.path()
+ endif
endif
config_h.set_quoted('PPPD_PATH', pppd_path)
@@ -625,7 +629,11 @@ foreach client : [ 'dhclient', 'dhcpcd', 'dhcpcanon' ]
'/usr/local/sbin/' + client,
required : false)
if client_prog.found()
- client_path = client_prog.path()
+ if meson.version().version_compare('>= 0.55')
+ client_path = client_prog.full_path()
+ else
+ client_path = client_prog.path()
+ endif
else
client_path = '/usr/sbin/' + client
message('@0@ not found, assume path @1@'.format(client, client_path))
@@ -667,7 +675,11 @@ foreach prog_name : ['resolvconf', 'netconfig']
'/usr/local/sbin/' + prog_name,
required : false)
if prog.found()
- prog_path = prog.path()
+ if meson.version().version_compare('>= 0.55')
+ prog_path = prog.full_path()
+ else
+ prog_path = prog.path()
+ endif
else
prog_enable = false
endif
@@ -705,7 +717,11 @@ foreach prog : progs
search_paths += (path + '/' + prog[0])
endforeach
exe = find_program(search_paths, required : false)
- path = exe.found() ? exe.path() : prog[2]
+ if meson.version().version_compare('>= 0.55')
+ path = exe.found() ? exe.full_path() : prog[2]
+ else
+ path = exe.found() ? exe.path() : prog[2]
+ endif
endif
name = prog[0].to_upper() + '_PATH'
config_h.set_quoted(name, path)
@@ -864,13 +880,18 @@ if enable_valgrind
if valgrind_suppressions_path == ''
valgrind_suppressions_path = join_paths(source_root, 'valgrind.suppressions')
endif
+ if meson.version().version_compare('>= 0.55')
+ valgrind_path = valgrind.full_path()
+ else
+ valgrind_path = valgrind.path()
+ endif
endif
test_args = [
'--called-from-make',
build_root,
'',
- enable_valgrind ? valgrind.path() : '',
+ enable_valgrind ? valgrind_path : '',
enable_valgrind ? valgrind_suppressions_path : '',
'--launch-dbus=auto',
]
@@ -879,7 +900,12 @@ python_mod = import('python')
python = python_mod.find_installation('python3', required: false)
if python.found()
- config_h.set_quoted('TEST_NM_PYTHON', python.path())
+ if meson.version().version_compare('>= 0.55')
+ python_path = python.full_path()
+ else
+ python_path = python.path()
+ endif
+ config_h.set_quoted('TEST_NM_PYTHON', python_path)
endif
data_conf = configuration_data()
@@ -1113,7 +1139,7 @@ output += ' more-logging: ' + more_logging.to_string() + '\n'
output += ' warning-level: ' + get_option('warning_level') + '\n'
output += ' valgrind: ' + enable_valgrind.to_string()
if enable_valgrind
- output += ' ' + valgrind.path()
+ output += ' ' + valgrind_path
endif
output += '\n'
output += ' code coverage: ' + get_option('b_coverage').to_string() + '\n'
diff --git a/src/libnm-client-impl/meson.build b/src/libnm-client-impl/meson.build
index 8a4c3e4366..3dd2338a82 100644
--- a/src/libnm-client-impl/meson.build
+++ b/src/libnm-client-impl/meson.build
@@ -190,7 +190,7 @@ if enable_introspection
input: [gen_infos_cmd, libnm_gir[0]] + libnm_core_settings_sources,
output: 'nm-property-infos-' + name + '.xml',
command: [
- python.path(),
+ python_path,
gen_infos_cmd,
name,
'@OUTPUT@',
@@ -206,7 +206,7 @@ if enable_introspection
'env',
'GI_TYPELIB_PATH=' + gi_typelib_path,
'LD_LIBRARY_PATH=' + ld_library_path,
- python.path(),
+ python_path,
gen_gir_cmd,
'--lib-path', meson.current_build_dir(),
'--gir', libnm_gir[0],
diff --git a/src/libnmc-setting/meson.build b/src/libnmc-setting/meson.build
index 70138d8b51..4d5079dfb3 100644
--- a/src/libnmc-setting/meson.build
+++ b/src/libnmc-setting/meson.build
@@ -9,7 +9,7 @@ if enable_docs
input: [merge_cmd, nm_settings_docs_xml_gir['nmcli'], nm_property_infos_xml['nmcli']],
output: 'settings-docs-input.xml',
command: [
- python.path(),
+ python_path,
merge_cmd,
'@OUTPUT@',
nm_property_infos_xml['nmcli'],
@@ -23,7 +23,7 @@ if enable_docs
input: [gen_cmd, settings_docs_input_xml],
output: 'settings-docs.h',
command: [
- python.path(),
+ python_path,
gen_cmd,
'--output', '@OUTPUT@',
'--xml', settings_docs_input_xml
diff --git a/src/tests/client/meson.build b/src/tests/client/meson.build
index 8c36e40559..5686a1c174 100644
--- a/src/tests/client/meson.build
+++ b/src/tests/client/meson.build
@@ -6,7 +6,7 @@ test(
args: [
build_root,
source_root,
- python.path(),
+ python_path,
'--',
'TestNmcli',
],
@@ -23,7 +23,7 @@ if enable_nm_cloud_setup
args: [
build_root,
source_root,
- python.path(),
+ python_path,
'--',
'TestNmCloudSetup',
],