aboutsummaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2025-07-21 09:14:26 -0700
committerJunio C Hamano <gitster@pobox.com>2025-07-21 09:14:27 -0700
commit867d9b19be799a9ff2863c53768c40db8d6299fa (patch)
treec34938d0c2f905547c66c2102ce01376eea07bd0 /meson.build
parent5f2b826b5429d734551e1dd7466c310b4279a6bb (diff)
parentd3d6493dcf35cc0ffb4ed88da85c3b206f02936a (diff)
downloadgit-867d9b19be799a9ff2863c53768c40db8d6299fa.tar.xz
Merge branch 'ps/meson-cleanups'
Meson-based build update. * ps/meson-cleanups: ci: use Meson's new `--slice` option meson: update subproject wrappers meson: fix lookup of shell on MINGW64 meson: clean up unnecessary variables meson: improve summary of auto-detected features meson: stop printing 'https' option twice in our summaries meson: stop discovering native version of Python
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build27
1 files changed, 14 insertions, 13 deletions
diff --git a/meson.build b/meson.build
index 9579377f3d..92d62695e3 100644
--- a/meson.build
+++ b/meson.build
@@ -245,7 +245,7 @@ time = find_program('time', dirs: program_path, required: get_option('benchmarks
# "/bin/sh" over a PATH-based lookup, which provides a working shell on most
# supported systems. This path is also the default shell path used by our
# Makefile. This lookup can be overridden via `program_path`.
-target_shell = find_program('sh', dirs: program_path + [ '/bin' ], native: false)
+target_shell = find_program('/bin/sh', 'sh', dirs: program_path, native: false)
# Sanity-check that programs required for the build exist.
foreach tool : ['cat', 'cut', 'grep', 'sort', 'tr', 'uname']
@@ -866,9 +866,11 @@ if host_machine.system() == 'cygwin' or host_machine.system() == 'windows'
endif
build_options_config.set_quoted('X', executable_suffix)
-python = import('python').find_installation('python3', required: get_option('python'))
-target_python = find_program('python3', native: false, required: python.found())
-if python.found()
+# Python is not used for our build system, but exclusively for git-p4.
+# Consequently we only need to determine whether Python is available for the
+# build target.
+target_python = find_program('python3', native: false, required: get_option('python'))
+if target_python.found()
build_options_config.set('NO_PYTHON', '')
else
libgit_c_args += '-DNO_PYTHON'
@@ -1970,7 +1972,7 @@ if perl_features_enabled
subdir('perl')
endif
-if python.found()
+if target_python.found()
scripts_python = [
'git-p4.py'
]
@@ -2197,16 +2199,15 @@ meson.add_dist_script(
summary({
'benchmarks': get_option('tests') and perl.found() and time.found(),
- 'curl': curl.found(),
- 'expat': expat.found(),
- 'gettext': intl.found(),
+ 'curl': curl,
+ 'expat': expat,
+ 'gettext': intl,
'gitweb': gitweb_option.allowed(),
- 'https': https_backend,
- 'iconv': iconv.found(),
- 'pcre2': pcre2.found(),
+ 'iconv': iconv,
+ 'pcre2': pcre2,
'perl': perl_features_enabled,
- 'python': python.found(),
-}, section: 'Auto-detected features')
+ 'python': target_python.found(),
+}, section: 'Auto-detected features', bool_yn: true)
summary({
'csprng': csprng_backend,