Merge pull request #6876 from LocutusOfBorg/fix-template

Fix pyproject.toml to create a fixed _version.py file, compatible wi…
This commit is contained in:
TW 2022-07-18 19:42:32 +02:00 committed by GitHub
commit b52781a999
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -3,4 +3,8 @@ requires = ["setuptools", "pkgconfig", "Cython", "setuptools_scm[toml]>=6.2"]
build-backend = "setuptools.build_meta"
[tool.setuptools_scm]
# make sure we have the same versioning scheme with all setuptools_scm versions, to avoid different autogenerated files
# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1015052
# https://github.com/borgbackup/borg/issues/6875
write_to = "src/borg/_version.py"
write_to_template = "__version__ = version = {version!r} \n__version_tuple__ = version_tuple = {version_tuple!r}"