pyproject.toml 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168
  1. [project]
  2. name = "borgbackup"
  3. dynamic = ["version", "readme"]
  4. authors = [{name="The Borg Collective (see AUTHORS file)"}]
  5. maintainers = [
  6. {name="Thomas Waldmann", email="tw@waldmann-edv.de"},
  7. ]
  8. description = "Deduplicated, encrypted, authenticated and compressed backups"
  9. requires-python = ">=3.9"
  10. keywords = ["backup", "borgbackup"]
  11. classifiers = [
  12. "Development Status :: 4 - Beta",
  13. "Environment :: Console",
  14. "Intended Audience :: System Administrators",
  15. "License :: OSI Approved :: BSD License",
  16. "Operating System :: POSIX :: BSD :: FreeBSD",
  17. "Operating System :: POSIX :: BSD :: OpenBSD",
  18. "Operating System :: POSIX :: BSD :: NetBSD",
  19. "Operating System :: MacOS :: MacOS X",
  20. "Operating System :: POSIX :: Linux",
  21. "Programming Language :: Python",
  22. "Programming Language :: Python :: 3",
  23. "Programming Language :: Python :: 3.9",
  24. "Programming Language :: Python :: 3.10",
  25. "Programming Language :: Python :: 3.11",
  26. "Programming Language :: Python :: 3.12",
  27. "Programming Language :: Python :: 3.13",
  28. "Topic :: Security :: Cryptography",
  29. "Topic :: System :: Archiving :: Backup",
  30. ]
  31. license = {text="BSD"}
  32. dependencies = [
  33. # we are rather picky about msgpack versions, because a good working msgpack is
  34. # very important for borg, see: https://github.com/borgbackup/borg/issues/3753
  35. # Please note:
  36. # using any other msgpack version is not supported by borg development and
  37. # any feedback related to issues caused by this will be ignored.
  38. "msgpack >=1.0.3, <=1.1.0",
  39. "packaging",
  40. ]
  41. # note for package maintainers: if you package borgbackup for distribution,
  42. # please (if available) add pyfuse3 (preferably) or llfuse as a *requirement*.
  43. # "borg mount" needs one of them to work.
  44. # if neither is available, do not require it, most of borgbackup will work.
  45. [project.optional-dependencies]
  46. llfuse = ["llfuse >= 1.3.8"]
  47. pyfuse3 = ["pyfuse3 >= 3.1.1"]
  48. nofuse = []
  49. [project.urls]
  50. "Homepage" = "https://borgbackup.org/"
  51. "Bug Tracker" = "https://github.com/borgbackup/borg/issues"
  52. "Documentation" = "https://borgbackup.readthedocs.io/"
  53. "Repository" = "https://github.com/borgbackup/borg"
  54. "Changelog" = "https://github.com/borgbackup/borg/blob/1.4-maint/docs/changes.rst"
  55. [project.scripts]
  56. borg = "borg.archiver:main"
  57. borgfs = "borg.archiver:main"
  58. [tool.setuptools]
  59. # See also the MANIFEST.in file.
  60. # We want to install all the files in the package directories...
  61. include-package-data = true
  62. [tool.setuptools.packages.find]
  63. where = ["src"]
  64. [tool.setuptools.exclude-package-data]
  65. # ...except the source files which have been compiled (C extensions):
  66. "*" = ["*.c", "*.h", "*.pyx"]
  67. [build-system]
  68. requires = ["setuptools>=64", "setuptools_scm>=8", "wheel", "pkgconfig", "Cython>=3.0.3"]
  69. build-backend = "setuptools.build_meta"
  70. [tool.setuptools_scm]
  71. # make sure we have the same versioning scheme with all setuptools_scm versions, to avoid different autogenerated files
  72. # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1015052
  73. # https://github.com/borgbackup/borg/issues/6875
  74. write_to = "src/borg/_version.py"
  75. write_to_template = "__version__ = version = {version!r}\n"
  76. [tool.ruff]
  77. line-length = 120
  78. target-version = "py39"
  79. # Enable pycodestyle (`E`) and Pyflakes (`F`) codes by default.
  80. select = ["E", "F"]
  81. # for reference ...
  82. # E402 module level import not at top
  83. # E501 line too long
  84. # F401 import unused
  85. # F405 undefined or defined from star imports
  86. # F811 redef of unused var
  87. # borg code style guidelines:
  88. # Ignoring E203 due to https://github.com/PyCQA/pycodestyle/issues/373
  89. ignore = ["E203", "F405", "E402"]
  90. # Allow autofix for all enabled rules (when `--fix`) is provided.
  91. fixable = ["A", "B", "C", "D", "E", "F", "G", "I", "N", "Q", "S", "T", "W", "ANN", "ARG", "BLE", "COM", "DJ", "DTZ", "EM", "ERA", "EXE", "FBT", "ICN", "INP", "ISC", "NPY", "PD", "PGH", "PIE", "PL", "PT", "PTH", "PYI", "RET", "RSE", "RUF", "SIM", "SLF", "TCH", "TID", "TRY", "UP", "YTT"]
  92. unfixable = []
  93. # Exclude a variety of commonly ignored directories.
  94. exclude = [
  95. ".cache",
  96. ".eggs",
  97. ".git",
  98. ".git-rewrite",
  99. ".idea",
  100. ".mypy_cache",
  101. ".ruff_cache",
  102. ".tox",
  103. "build",
  104. "dist",
  105. ]
  106. # Allow unused variables when underscore-prefixed.
  107. dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
  108. # Code style violation exceptions:
  109. # please note that the values are adjusted so that they do not cause failures
  110. # with existing code. if you want to change them, you should first fix all
  111. # ruff failures that appear with your change.
  112. [tool.ruff.per-file-ignores]
  113. "setup.py" = ["E501"]
  114. "scripts/make.py" = ["E501"]
  115. "src/borg/archive.py" = ["E501", "F401"]
  116. "src/borg/archiver.py" = ["E501", "F401", "E722", "E741"]
  117. "src/borg/cache.py" = ["E501", "E722"]
  118. "src/borg/crypto/key.py" = ["E501", "F401"]
  119. "src/borg/crypto/keymanager.py" = ["E501", "F401"]
  120. "src/borg/crypto/nonces.py" = ["E501"]
  121. "src/borg/fuse.py" = ["E501", "E722"]
  122. "src/borg/fuse_impl.py" = ["F811"]
  123. "src/borg/helpers/__init__.py" = ["F401"]
  124. "src/borg/helpers/checks.py" = ["F401"]
  125. "src/borg/helpers/manifest.py" = ["E501"]
  126. "src/borg/helpers/misc.py" = ["F401", "E722"]
  127. "src/borg/helpers/parseformat.py" = ["E501", "F401", "E741"]
  128. "src/borg/helpers/process.py" = ["F401"]
  129. "src/borg/locking.py" = ["E501", "E722"]
  130. "src/borg/platform/__init__.py" = ["F401", "F811"]
  131. "src/borg/remote.py" = ["E501"]
  132. "src/borg/repository.py" = ["E501", "F401"]
  133. "src/borg/shellpattern.py" = ["E501"]
  134. "src/borg/testsuite/__init__.py" = ["E501", "F401"]
  135. "src/borg/testsuite/archiver.py" = ["E501", "E722", "F401"]
  136. "src/borg/testsuite/benchmark.py" = ["F811", "F401"]
  137. "src/borg/testsuite/chunker.py" = ["E501"]
  138. "src/borg/testsuite/crypto.py" = ["E501", "E741"]
  139. "src/borg/testsuite/file_integrity.py" = ["F401"]
  140. "src/borg/testsuite/hashindex.py" = ["F401"]
  141. "src/borg/testsuite/helpers.py" = ["E501"]
  142. "src/borg/testsuite/key.py" = ["F401"]
  143. "src/borg/testsuite/locking.py" = ["E501", "E722", "F401"]
  144. "src/borg/testsuite/platform.py" = ["E501", "F811", "F401"]
  145. "src/borg/testsuite/repository.py" = ["E501", "F401"]
  146. "src/borg/upgrader.py" = ["E501"]
  147. [tool.pytest.ini_options]
  148. python_files = "testsuite/*.py"
  149. markers = [
  150. "allow_cache_wipe",
  151. ]