From 3ffa9821b9b10b97a0c8582688203b99c592611e Mon Sep 17 00:00:00 2001 From: Daniel Wagner Date: Tue, 22 Apr 2025 18:24:48 +0200 Subject: [PATCH 1/2] build: split 'dev' postfix from version string For the test PyPi upload we need to touch the version string and append the current dev version. Thus split it away if present from the library so version. Signed-off-by: Daniel Wagner --- meson.build | 1 + 1 file changed, 1 insertion(+) diff --git a/meson.build b/meson.build index b711a08aa..188fddd09 100644 --- a/meson.build +++ b/meson.build @@ -21,6 +21,7 @@ project( ) vstr = meson.project_version().split('-rc')[0] +vstr = vstr.split('.dev')[0] vid = vstr.split('.') library_version = '.'.join([vid[0], vid[1]]) if vid.length() == 3 From e163348c7899527194beb65c483f6228bc7e3b5c Mon Sep 17 00:00:00 2001 From: Daniel Wagner Date: Tue, 22 Apr 2025 18:25:59 +0200 Subject: [PATCH 2/2] biuld: patch the meson.build for test pypi upload We are using the meson backend for buidling the sdist, thus the version string is from the meson.build file. Signed-off-by: Daniel Wagner --- .github/workflows/release-python.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release-python.yml b/.github/workflows/release-python.yml index 03f5650ad..9a1114f0a 100644 --- a/.github/workflows/release-python.yml +++ b/.github/workflows/release-python.yml @@ -67,9 +67,9 @@ jobs: echo "dev_version=$VERSION" >> $GITHUB_OUTPUT echo "Computed dev version: $VERSION" - - name: Patch version in pyproject.toml + - name: Patch version in meson.build run: | - sed -i "s/^version = .*/version = \"${{ steps.version.outputs.dev_version }}\"/" pyproject.toml + sed -i -e "0,/[ \t]version: /s/\([ \t]version: \).*/\1\'${{ steps.version.outputs.dev_version }}\',/" meson.build - name: Build sdist run: |