From d98054f7a2918e193191e1f719d33e8d222e8228 Mon Sep 17 00:00:00 2001 From: Ludovic Henry Date: Mon, 14 Sep 2026 21:26:49 +0200 Subject: [PATCH] swiglpk: commit the patch and re-tag to avoid a versioneer dev version versioneer (setup.py: version=versioneer.get_version()) has no env-var pretend-version override, unlike setuptools_scm. It renders the version from `git describe --tags --dirty`, so the patched-but-uncommitted tree came out as 5.0.13+0.g3b4202a.dirty instead of the clean 5.0.13. Commit the patch and force-move the local tag onto it so describe reports the exact tagged version again (0 distance, clean tree). --- .github/workflows/build-swiglpk.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-swiglpk.yml b/.github/workflows/build-swiglpk.yml index 997d0324c..962a914fb 100644 --- a/.github/workflows/build-swiglpk.yml +++ b/.github/workflows/build-swiglpk.yml @@ -67,7 +67,16 @@ jobs: persist-credentials: false - name: Apply patches - run: git apply -v python-wheels/patches/swiglpk/${{ env.SWIGLPK_VERSION }}/*.patch + # versioneer (setup.py: version=versioneer.get_version()) has no env-var + # pretend-version override, unlike setuptools_scm. It renders the version + # from `git describe --tags --dirty`, so a patched-but-uncommitted tree + # comes out as e.g. "5.0.13+0.g3b4202a.dirty" instead of the clean + # "5.0.13". Commit the patch and re-point the local tag at it so describe + # reports the exact tagged version again (0 distance, clean tree). + run: | + git apply -v python-wheels/patches/swiglpk/${{ env.SWIGLPK_VERSION }}/*.patch + git -c user.name=ci -c user.email=ci@localhost commit -am "riscv64 patches" + git tag -f ${{ env.SWIGLPK_VERSION }} - name: Build wheels uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0