Fixes #253
-
setuptools_scm
was added as a setup dependency and ci dependency -
use_scm_version
(fromsetuptools_scm
) is used instead ofversion
to always generate the right version number based on git. - in addition,
write_to
is used inuse_scm_version
so that a_version.py
file is automatically created when building the wheel. - Finally the
__init__.py
contains code supporting the two cases: either the_version.py
file is present and it should be read, or it is not present andsetuptools_scm
is used programmatically to generate the version based on git information
.gitignore
was modified so that the _version.py
file cannot be added by mistake.
All these best practices come from https://smarie.github.io/python-getversion/#package-versioning-best-practices