Skip to content

Commit 4544439

Browse files
committed
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 <wagi@kernel.org>
1 parent 6a88792 commit 4544439

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

.github/workflows/libnvme-release-python.yml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -67,13 +67,9 @@ jobs:
6767
echo "dev_version=$VERSION" >> $GITHUB_OUTPUT
6868
echo "Computed dev version: $VERSION"
6969
70-
- name: Patch project version in meson.build
71-
env:
72-
DEV_VERSION: ${{ steps.version.outputs.dev_version }}
73-
run: |
74-
sed -i -e "/^project(/,/)/ s/^\(\s*\)version:\s*.*/\1version: '${DEV_VERSION}',/" meson.build
75-
7670
- name: Build sdist
71+
env:
72+
MESONPY_PROJECT_VERSION: ${{ steps.version.outputs.dev_version }}
7773
run: |
7874
pipx run build --sdist
7975

0 commit comments

Comments
 (0)