From 6cb5648049ef5f87baf0e16e1277de2a3351965e Mon Sep 17 00:00:00 2001 From: Daniel Wagner Date: Fri, 9 Jan 2026 14:24:19 +0100 Subject: [PATCH] build: replace the version patching with mesonpy approach Under PEP 517, when the backend detects a VCS checkout, build does roughly this: - Creates an isolated build environment - Exports the source tree using git archive - Builds the sdist from that exported tree Thus the changes in meson.build are not picked up. Though the version can be overwritten via the MESONPY_PROJECT_VERSION environment variable. Signed-off-by: Daniel Wagner --- .github/workflows/libnvme-release-python.yml | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/.github/workflows/libnvme-release-python.yml b/.github/workflows/libnvme-release-python.yml index 864ea04451..fce4c01c99 100644 --- a/.github/workflows/libnvme-release-python.yml +++ b/.github/workflows/libnvme-release-python.yml @@ -67,13 +67,9 @@ jobs: echo "dev_version=$VERSION" >> $GITHUB_OUTPUT echo "Computed dev version: $VERSION" - - name: Patch project version in meson.build - env: - DEV_VERSION: ${{ steps.version.outputs.dev_version }} - run: | - sed -i -e "/^project(/,/)/ s/^\(\s*\)version:\s*.*/\1version: '${DEV_VERSION}',/" meson.build - - name: Build sdist + env: + MESONPY_PROJECT_VERSION: ${{ steps.version.outputs.dev_version }} run: | pipx run build --sdist