hey folks, I am trying to build a wheel from Pants...
# development
f
hey folks, I am trying to build a wheel from Pants checkout for the version 2.13.0 locally. However, I get
pantsbuild.pants-2.13.0+git852f4202-cp39-cp39-macosx_12_0_x86_64.whl
produced whereas I was expecting a version without the short Git SHA (i.e.
2.13.0
). I read the docs but still unsure what’s wrong.
What I’ve done: 1.
git clone git@github.com:pantsbuild/pants.git
2.
git checkout 852f420212ecd29ff54cd4a906bf80944ec272bd
3.
git log
Copy code
commit 852f420212ecd29ff54cd4a906bf80944ec272bd (HEAD, tag: release_2.13.0)
Author: Eric Arellano <ericarellano@me.com>
Date:   Wed Sep 7 15:17:55 2022 -0500

    Bump version to 2.13.0
4.
USE_PY39=true build-support/bin/release.sh build-wheels
I’d like to avoid making manual changes in the
pants/build-support/bin/_release_helper.py
doing
git reset --hard 852f420212ecd29ff54cd4a906bf80944ec272bd
doesn’t effect the version produced
h
that's expected. we "reversion" the wheels. inside
_release_helper.py
, we call
reversion_prebuilt_wheels()
. You can also run the
reversion.py
script, use
reversion.py --help
for the API
f
Thank you! I did this
Copy code
$ ./pants run build-support/bin/reversion.py -- dist/deploy/wheels/pantsbuild.pants/852f420212ecd29ff54cd4a906bf80944ec272bd/2.13.0+git852f4202/pantsbuild.pants-2.13.0+git852f4202-cp39-cp39-macosx_12_0_x86_64.whl output 2.13.0 --extra-globs="pants/VERSION"
and it seems to do the trick
❤️ 1