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