Instead of the Makefile hack, the __version__ generation should be a build-tool, which runs at every build/install/etc., and the file perhaps should not even be checked in.
The emitted version number could then include a tag like -local or -68b4de (i.e. the git shorthash) based on whether it matches HEAD on origin/main or the like.
Instead of the Makefile hack, the
__version__
generation should be a build-tool, which runs at every build/install/etc., and the file perhaps should not even be checked in.The emitted version number could then include a tag like
-local
or-68b4de
(i.e. the git shorthash) based on whether it matches HEAD on origin/main or the like.