浏览代码

move setuptools_scm configuration to pyproject.toml

Thomas Waldmann 1 年之前
父节点
当前提交
5049817d43
共有 2 个文件被更改,包括 7 次插入4 次删除
  1. 7 0
      pyproject.toml
  2. 0 4
      setup.py

+ 7 - 0
pyproject.toml

@@ -1,3 +1,10 @@
 [build-system]
 requires = ["setuptools", "wheel", "pkgconfig", "Cython", "setuptools_scm>=1.7"]
 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"

+ 0 - 4
setup.py

@@ -262,10 +262,6 @@ if not on_rtd:
 # 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',
-    },
     author='The Borg Collective (see AUTHORS file)',
     author_email='borgbackup@python.org',
     url='https://borgbackup.readthedocs.io/',