I use python3 -m build to build my python package like documented in the official docs: Packaging Projects.
But I don't want to store my version number in the source code, because this creates too many useless changes in the git repository.
Is there a way to leave version empty in setup.cfg and provide the version via the python3 -m build command line?
I use the recommended pyproject.toml file:
[build-system]
requires = [
"setuptools>=42",
"wheel"
]
build-backend = "setuptools.build_meta"
Related question in the Python Forum: https://discuss.python.org/t/avoid-having-version-number-in-source-code/10188
Related issue: https://github.com/pypa/build/issues/347