pyproject.toml 4.6 KB

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