2
0
Эх сурвалжийг харах

Merge pull request #6877 from LocutusOfBorg/fix-template-1.2

 Fix pyproject.toml to create a fixed _version.py file, compatible wi…
TW 2 жил өмнө
parent
commit
a4a2530a29
1 өөрчлөгдсөн 4 нэмэгдсэн , 1 устгасан
  1. 4 1
      setup.py

+ 4 - 1
setup.py

@@ -257,11 +257,14 @@ if not on_rtd:
         # 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',