From ad8555e9212467dfc876d147d1ed3d6455d9a1d3 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) --- setup.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 5a0e72359..95c31fe02 100644 --- a/setup.py +++ b/setup.py @@ -257,11 +257,14 @@ def members_appended(*ds): # generate C code from Cython for THIS platform (and for all platform-independent Cython parts). ext_modules = cythonize(ext_modules, **cython_opts) - +# 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 setup( name='borgbackup', use_scm_version={ 'write_to': 'src/borg/_version.py', + 'write_to_template': '__version__ = version = {version!r} \n__version_tuple__ = version_tuple = {version_tuple!r}', }, author='The Borg Collective (see AUTHORS file)', author_email='borgbackup@python.org',