* [PATCH] buildtools: allow a different minimum meson version for Windows
@ 2025-06-13 16:14 Andre Muezerie
0 siblings, 0 replies; only message in thread
From: Andre Muezerie @ 2025-06-13 16:14 UTC (permalink / raw)
To: Bruce Richardson; +Cc: dev, Andre Muezerie
There is a minimum meson version specified in the DPDK meson project
section, which has been documented. This string is parsed by
buildtools\get-min-meson-version.py and this information is used by
lab automation to install the corresponding meson package on the
build machine.
Turns out that the meson version specified on the DPDK project
(0.57.x) is buggy on Windows: it has issues related to path
manipulation, and these issues are causing failures. Therefore,
a newer meson is required on Windows.
To avoid bringing the minimum requirements up for all operating
systems before a more appropriate release, this patch implements
a mechanism allowing a different version to be specified for Windows.
Signed-off-by: Andre Muezerie <andremue@linux.microsoft.com>
---
buildtools/get-min-meson-version.py | 12 ++++++++++--
meson.build | 9 +++++++++
2 files changed, 19 insertions(+), 2 deletions(-)
diff --git a/buildtools/get-min-meson-version.py b/buildtools/get-min-meson-version.py
index f0de8fdf2b..10a2596a5a 100755
--- a/buildtools/get-min-meson-version.py
+++ b/buildtools/get-min-meson-version.py
@@ -11,12 +11,19 @@
basedir = dirname(buildtools_path)
with open(join(basedir, "meson.build")) as f:
+ if os.name == "nt":
+ keyword = "windows_meson_version"
+ pattern = r"windows_meson_version:\s*'>=\s*([0-9\.]+)'"
+ else:
+ keyword = "meson_version"
+ pattern = r"meson_version:\s*'>=\s*([0-9\.]+)'"
+
for ln in f.readlines():
- if "meson_version" not in ln:
+ if keyword not in ln:
continue
ln = ln.strip()
- ver_match = re.search(r"meson_version:\s*'>=\s*([0-9\.]+)'", ln)
+ ver_match = re.search(pattern, ln)
if not ver_match:
print(
f"Meson version specifier not in recognised format: '{ln}'",
@@ -24,3 +31,4 @@
)
sys.exit(1)
print(ver_match.group(1), end="")
+ break
diff --git a/meson.build b/meson.build
index 5ff68cb3af..1ae51996be 100644
--- a/meson.build
+++ b/meson.build
@@ -13,6 +13,15 @@ project('DPDK', 'c',
meson_version: '>= 0.57.2'
)
+# Meson does not support dynamic/conditional values for meson_version in
+# the project section.
+# The line below contains the minimum meson version required on Windows,
+# which gets parsed by get-min-meson-version.py.
+# It is important to keep this line below the "project" section, so that
+# the script can make the correct determination according to the operating
+# system.
+# windows_meson_version: '>= 1.5.2'
+
fs = import('fs')
# check for developer mode
--
2.49.0.vfs.0.3
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2025-06-13 16:14 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-06-13 16:14 [PATCH] buildtools: allow a different minimum meson version for Windows Andre Muezerie
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).