I feel lost. Each time I look at examples on how to write a Python package. I see a __version__
hardcoded in __init__.py
. So we find the version hardcoded in:
setup.py
- a Git tag
__version__
CHANGELOG
...
This doesn't look very SSOT at all.
Even today, it is a common way to write the version in setup.cfg
. However, I would like only Git to hold the version, then use a git describe
on the CI to populate whatever needs to be populated.
Is there any proper way to let my CI do the job for me?
Why most popular packages have hardcoded versions?