Fixes #253
-
setuptools_scmwas added as a setup dependency and ci dependency -
use_scm_version(fromsetuptools_scm) is used instead ofversionto always generate the right version number based on git. - in addition,
write_tois used inuse_scm_versionso that a_version.pyfile is automatically created when building the wheel. - Finally the
__init__.pycontains code supporting the two cases: either the_version.pyfile is present and it should be read, or it is not present andsetuptools_scmis 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