pyproject.toml 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148
  1. [project]
  2. name = "borgbackup"
  3. dynamic = ["version"]
  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. readme = "README.rst"
  10. requires-python = ">=3.9"
  11. keywords = ["backup", "borgbackup"]
  12. classifiers = [
  13. "Development Status :: 4 - Beta",
  14. "Environment :: Console",
  15. "Intended Audience :: System Administrators",
  16. "License :: OSI Approved :: BSD License",
  17. "Operating System :: POSIX :: BSD :: FreeBSD",
  18. "Operating System :: POSIX :: BSD :: OpenBSD",
  19. "Operating System :: POSIX :: BSD :: NetBSD",
  20. "Operating System :: MacOS :: MacOS X",
  21. "Operating System :: POSIX :: Linux",
  22. "Programming Language :: Python",
  23. "Programming Language :: Python :: 3",
  24. "Programming Language :: Python :: 3.9",
  25. "Programming Language :: Python :: 3.10",
  26. "Programming Language :: Python :: 3.11",
  27. "Programming Language :: Python :: 3.12",
  28. "Topic :: Security :: Cryptography",
  29. "Topic :: System :: Archiving :: Backup",
  30. ]
  31. license = {text="BSD"}
  32. dependencies = [
  33. "msgpack >=1.0.3, <=1.0.5",
  34. "packaging",
  35. "platformdirs >=3.0.0, <4.0.0; sys_platform == 'darwin'", # for macOS: breaking changes in 3.0.0,
  36. "platformdirs >=2.6.0, <4.0.0; sys_platform != 'darwin'", # for others: 2.6+ works consistently.
  37. "argon2-cffi",
  38. ]
  39. [project.optional-dependencies]
  40. llfuse = ["llfuse >= 1.3.8"]
  41. pyfuse3 = ["pyfuse3 >= 3.1.1"]
  42. nofuse = []
  43. [project.urls]
  44. "Homepage" = "https://borgbackup.org/"
  45. "Bug Tracker" = "https://github.com/borgbackup/borg/issues"
  46. "Documentation" = "https://borgbackup.readthedocs.io/"
  47. "Repository" = "https://github.com/borgbackup/borg"
  48. "Changelog" = "https://github.com/borgbackup/borg/blob/master/docs/changes.rst"
  49. [project.scripts]
  50. borg = "borg.archiver:main"
  51. borgfs = "borg.archiver:main"
  52. [build-system]
  53. requires = ["setuptools", "pkgconfig", "Cython", "setuptools_scm[toml]>=6.2"]
  54. build-backend = "setuptools.build_meta"
  55. [tool.setuptools_scm]
  56. # make sure we have the same versioning scheme with all setuptools_scm versions, to avoid different autogenerated files
  57. # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1015052
  58. # https://github.com/borgbackup/borg/issues/6875
  59. write_to = "src/borg/_version.py"
  60. write_to_template = "__version__ = version = {version!r}\n"
  61. [tool.black]
  62. line-length = 120
  63. skip-magic-trailing-comma = true
  64. [tool.ruff]
  65. line-length = 120
  66. target-version = "py39"
  67. # Enable pycodestyle (`E`) and Pyflakes (`F`) codes by default.
  68. select = ["E", "F"]
  69. # for reference ...
  70. # E402 module level import not at top
  71. # E501 line too long
  72. # F401 import unused
  73. # F405 undefined or defined from star imports
  74. # F811 redef of unused var
  75. # borg code style guidelines:
  76. # Ignoring E203 due to https://github.com/PyCQA/pycodestyle/issues/373
  77. ignore = ["E203", "F405", "E402"]
  78. # Allow autofix for all enabled rules (when `--fix`) is provided.
  79. 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"]
  80. unfixable = []
  81. # Exclude a variety of commonly ignored directories.
  82. exclude = [
  83. ".cache",
  84. ".eggs",
  85. ".git",
  86. ".git-rewrite",
  87. ".idea",
  88. ".mypy_cache",
  89. ".ruff_cache",
  90. ".tox",
  91. "build",
  92. "dist",
  93. ]
  94. # Allow unused variables when underscore-prefixed.
  95. dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
  96. # Code style violation exceptions:
  97. # please note that the values are adjusted so that they do not cause failures
  98. # with existing code. if you want to change them, you should first fix all
  99. # ruff failures that appear with your change.
  100. [tool.ruff.per-file-ignores]
  101. "setup_docs.py" = ["E501"]
  102. "src/borg/archive.py" = ["E501"]
  103. "src/borg/archiver/help_cmd.py" = ["E501"]
  104. "src/borg/cache.py" = ["E501"]
  105. "src/borg/helpers/__init__.py" = ["F401"]
  106. "src/borg/platform/__init__.py" = ["F401"]
  107. "src/borg/testsuite/archiver/disk_full.py" = ["F811"]
  108. "src/borg/testsuite/archiver/return_codes.py" = ["F811"]
  109. "src/borg/testsuite/benchmark.py" = ["F811"]
  110. "src/borg/testsuite/platform.py" = ["F811"]
  111. [tool.pytest.ini_options]
  112. python_files = "testsuite/*.py"
  113. markers = [
  114. "allow_cache_wipe",
  115. ]
  116. [tool.mypy]
  117. python_version = "3.9"
  118. strict_optional = false
  119. local_partial_types = true
  120. show_error_codes = true
  121. files = "src/borg/**/*.py"
  122. [[tool.mypy.overrides]]
  123. module = [
  124. "msgpack.*",
  125. "llfuse",
  126. "pyfuse3",
  127. "trio",
  128. "borg.crypto.low_level",
  129. "borg.platform.*",
  130. ]
  131. ignore_missing_imports = true