pyproject.toml 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176
  1. [build-system]
  2. requires = ["setuptools>=77.0.0"]
  3. build-backend = "setuptools.build_meta"
  4. [project]
  5. name = "dulwich"
  6. description = "Python Git Library"
  7. readme = "README.rst"
  8. authors = [{name = "Jelmer Vernooij", email = "jelmer@jelmer.uk"}]
  9. license = "Apache-2.0 OR GPL-2.0-or-later"
  10. keywords = ["vcs", "git"]
  11. classifiers = [
  12. "Development Status :: 4 - Beta",
  13. "Programming Language :: Python :: 3.9",
  14. "Programming Language :: Python :: 3.10",
  15. "Programming Language :: Python :: 3.11",
  16. "Programming Language :: Python :: 3.12",
  17. "Programming Language :: Python :: 3.13",
  18. "Programming Language :: Python :: 3.14",
  19. "Programming Language :: Python :: Implementation :: CPython",
  20. "Programming Language :: Python :: Implementation :: PyPy",
  21. "Operating System :: POSIX",
  22. "Operating System :: Microsoft :: Windows",
  23. "Topic :: Software Development :: Version Control",
  24. ]
  25. requires-python = ">=3.9"
  26. dependencies = [
  27. "urllib3>=2.2.2",
  28. 'typing_extensions >=4.6.0 ; python_version < "3.12"',
  29. ]
  30. dynamic = ["version"]
  31. license-files = ["COPYING"]
  32. [project.urls]
  33. Homepage = "https://www.dulwich.io/"
  34. Repository = "https://www.dulwich.io/code/"
  35. GitHub = "https://github.com/dulwich/dulwich"
  36. "Bug Tracker" = "https://github.com/dulwich/dulwich/issues"
  37. [project.optional-dependencies]
  38. fastimport = ["fastimport"]
  39. https = ["urllib3>=2.2.2"]
  40. pgp = ["gpg"]
  41. paramiko = ["paramiko"]
  42. colordiff = ["rich"]
  43. dev = [
  44. "ruff==0.13.2",
  45. "mypy==1.18.2",
  46. "dissolve>=0.1.1",
  47. "codespell==2.4.1",
  48. ]
  49. merge = ["merge3"]
  50. fuzzing = ["atheris"]
  51. patiencediff = ["patiencediff"]
  52. [project.scripts]
  53. dulwich = "dulwich.cli:main"
  54. [tool.mypy]
  55. strict = true
  56. disallow_untyped_defs = true
  57. disallow_untyped_calls = true
  58. disallow_incomplete_defs = true
  59. check_untyped_defs = true
  60. disallow_untyped_decorators = true
  61. no_implicit_optional = true
  62. warn_redundant_casts = true
  63. warn_unused_ignores = true
  64. warn_return_any = true
  65. strict_equality = true
  66. ignore_missing_imports = true
  67. [[tool.mypy.overrides]]
  68. module = "atheris"
  69. ignore_missing_imports = true
  70. [[tool.mypy.overrides]]
  71. module = "fastimport"
  72. ignore_missing_imports = true
  73. no_implicit_reexport = false
  74. disallow_untyped_calls = false
  75. warn_return_any = false
  76. [[tool.mypy.overrides]]
  77. module = "fastimport.*"
  78. ignore_missing_imports = true
  79. no_implicit_reexport = false
  80. disallow_untyped_calls = false
  81. warn_return_any = false
  82. [[tool.mypy.overrides]]
  83. module = "patiencediff"
  84. ignore_missing_imports = true
  85. no_implicit_reexport = false
  86. disallow_untyped_calls = false
  87. warn_return_any = false
  88. [[tool.mypy.overrides]]
  89. module = "merge3"
  90. ignore_missing_imports = true
  91. disallow_untyped_calls = false
  92. warn_return_any = false
  93. [tool.setuptools]
  94. packages = [
  95. "dulwich",
  96. "dulwich.cloud",
  97. "dulwich.contrib",
  98. "dulwich.tests",
  99. ]
  100. include-package-data = true
  101. zip-safe = false
  102. script-files = [
  103. "bin/dul-receive-pack",
  104. "bin/dul-upload-pack",
  105. ]
  106. [tool.setuptools.dynamic]
  107. version = {attr = "dulwich.__version__"}
  108. [tool.ruff.lint]
  109. select = [
  110. "ANN",
  111. "D",
  112. "E",
  113. "F",
  114. "I",
  115. "PIE",
  116. "UP",
  117. "RSE",
  118. "RUF",
  119. ]
  120. ignore = [
  121. "ANN001",
  122. "ANN002",
  123. "ANN003",
  124. "ANN201",
  125. "ANN202",
  126. "ANN204",
  127. "ANN205",
  128. "ANN206",
  129. "E501", # line too long
  130. "UP007", # Use X | Y for type annotations (Python 3.10+ syntax, but we support 3.9+)
  131. ]
  132. [tool.ruff.lint.pydocstyle]
  133. convention = "google"
  134. [tool.ruff.lint.per-file-ignores]
  135. "tests/**/*.py" = ["D"] # Don't require docstrings in tests
  136. "fuzzing/**/*.py" = ["D"] # Don't require docstrings in fuzzing
  137. "examples/**/*.py" = ["D"] # Don't require docstrings in examples
  138. "devscripts/**/*.py" = ["D"] # Don't require docstrings in devscripts
  139. "docs/conf.py" = ["D"] # Don't require docstrings in docs config
  140. "setup.py" = ["D"] # Don't require docstrings in setup.py
  141. [tool.cibuildwheel]
  142. skip = ""
  143. environment = {PATH="$HOME/.cargo/bin:$PATH"}
  144. before-build = "pip install -U setuptools-rust && curl https://sh.rustup.rs -sSf | sh -s -- --profile=minimal -y && rustup show"
  145. [tool.cibuildwheel.linux]
  146. skip = "*-musllinux_*"
  147. archs = ["auto", "aarch64"]
  148. before-build = "pip install -U setuptools-rust && yum -y install libatomic && curl https://sh.rustup.rs -sSf | sh -s -- --profile=minimal -y && rustup show"
  149. [tool.cibuildwheel.macos]
  150. archs = ["auto", "universal2", "x86_64", "arm64"]
  151. before-all = "rustup target add x86_64-apple-darwin aarch64-apple-darwin"
  152. skip = """\
  153. cp39-macosx_x86_64 cp39-macosx_universal2 \
  154. cp310-macosx_x86_64 cp310-macosx_universal2 \
  155. cp311-macosx_x86_64 cp311-macosx_universal2 \
  156. cp312-macosx_x86_64 cp312-macosx_universal2 \
  157. cp313-macosx_x86_64 cp313-macosx_universal2 \
  158. """