From a92c156e05e30e4ee85a0410161b2c062b351949 Mon Sep 17 00:00:00 2001 From: Gianfranco Costamagna Date: Mon, 18 Jul 2022 18:56:59 +0200 Subject: [PATCH] Fix pyproject.toml to create a fixed _version.py file, compatible with both old and new setuptools_scm version (see: #6875) --- pyproject.toml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index 9261fbe8b7..a8132e357c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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}"