Skip to content

Commit e40cc52

Browse files
committed
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 <wagi@kernel.org>
1 parent 5e7eb0c commit e40cc52

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

meson.build

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,9 @@ endif
7474
# version to be composed of 2 or 3 digits after stripping trailing identifiers
7575
# such as "-rc.*". If the project version is composed of only two digits, then
7676
# we append '.0' to it.
77-
ver_digits = meson.project_version().split('-')[0]
77+
ver = meson.project_version()
78+
ver_digits = ver.split('-')[0]
79+
ver_digits = ver_digits.split('.dev')[0]
7880
num_digits = ver_digits.split('.').length()
7981
if num_digits < 2 or num_digits > 3
8082
error('Invalid version: ', meson.project_version())

0 commit comments

Comments
 (0)