From 3dc843b33d152e017ce23b8642be09db891e626a Mon Sep 17 00:00:00 2001 From: Daniel Wagner Date: Mon, 5 Jan 2026 15:26:59 +0100 Subject: [PATCH] build: handle PyPi versioning scheme for library versioning When building the test CI build for Python, the versioning scheme is switched to a PyPi scheme. That is X.Y.devN, where N is the git commit distance to the last tag. The version string for the library needs to be of type X.Y.Z, thus the '.dev' part has to be splitted away. Signed-off-by: Daniel Wagner --- meson.build | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/meson.build b/meson.build index 9c5f7a81c5..e4dab1f125 100644 --- a/meson.build +++ b/meson.build @@ -74,7 +74,9 @@ endif # version to be composed of 2 or 3 digits after stripping trailing identifiers # such as "-rc.*". If the project version is composed of only two digits, then # we append '.0' to it. -ver_digits = meson.project_version().split('-')[0] +ver = meson.project_version() +ver_digits = ver.split('-')[0] +ver_digits = ver_digits.split('.dev')[0] num_digits = ver_digits.split('.').length() if num_digits < 2 or num_digits > 3 error('Invalid version: ', meson.project_version())