pyproject.toml 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182
  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.10",
  14. "Programming Language :: Python :: 3.11",
  15. "Programming Language :: Python :: 3.12",
  16. "Programming Language :: Python :: 3.13",
  17. "Programming Language :: Python :: 3.14",
  18. "Programming Language :: Python :: Implementation :: CPython",
  19. "Programming Language :: Python :: Implementation :: PyPy",
  20. "Operating System :: POSIX",
  21. "Operating System :: Microsoft :: Windows",
  22. "Topic :: Software Development :: Version Control",
  23. ]
  24. requires-python = ">=3.10"
  25. dependencies = [
  26. "urllib3>=2.2.2",
  27. 'typing_extensions >=4.6.0 ; python_version < "3.12"',
  28. ]
  29. dynamic = ["version"]
  30. license-files = ["COPYING"]
  31. [project.urls]
  32. Homepage = "https://www.dulwich.io/"
  33. Repository = "https://www.dulwich.io/code/"
  34. GitHub = "https://github.com/dulwich/dulwich"
  35. "Bug Tracker" = "https://github.com/dulwich/dulwich/issues"
  36. [project.optional-dependencies]
  37. fastimport = ["fastimport"]
  38. https = ["urllib3>=2.2.2"]
  39. pgp = ["gpg"]
  40. paramiko = ["paramiko"]
  41. colordiff = ["rich"]
  42. dev = [
  43. "ruff==0.14.10",
  44. "mypy==1.19.1",
  45. "dissolve>=0.1.1",
  46. "codespell==2.4.1",
  47. ]
  48. merge = ["merge3"]
  49. fuzzing = ["atheris"]
  50. patiencediff = ["patiencediff"]
  51. aiohttp = ["aiohttp"]
  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.mypy.overrides]]
  94. module = "sshsig.*"
  95. ignore_missing_imports = true
  96. disallow_untyped_calls = false
  97. warn_return_any = false
  98. [tool.setuptools]
  99. packages = [
  100. "dulwich",
  101. "dulwich.aiohttp",
  102. "dulwich.cloud",
  103. "dulwich.contrib",
  104. "dulwich.porcelain",
  105. "dulwich.tests",
  106. ]
  107. include-package-data = true
  108. zip-safe = false
  109. script-files = [
  110. "bin/dul-receive-pack",
  111. "bin/dul-upload-pack",
  112. ]
  113. [tool.setuptools.dynamic]
  114. version = {attr = "dulwich.__version__"}
  115. [tool.ruff.lint]
  116. select = [
  117. "ANN",
  118. "D",
  119. "E",
  120. "F",
  121. "I",
  122. "PIE",
  123. "UP",
  124. "RSE",
  125. "RUF",
  126. ]
  127. ignore = [
  128. "ANN001",
  129. "ANN002",
  130. "ANN003",
  131. "ANN201",
  132. "ANN202",
  133. "ANN204",
  134. "ANN205",
  135. "ANN206",
  136. "E501", # line too long
  137. ]
  138. [tool.ruff.lint.pydocstyle]
  139. convention = "google"
  140. [tool.ruff.lint.per-file-ignores]
  141. "tests/**/*.py" = ["D"] # Don't require docstrings in tests
  142. "fuzzing/**/*.py" = ["D"] # Don't require docstrings in fuzzing
  143. "examples/**/*.py" = ["D"] # Don't require docstrings in examples
  144. "devscripts/**/*.py" = ["D"] # Don't require docstrings in devscripts
  145. "docs/conf.py" = ["D"] # Don't require docstrings in docs config
  146. "setup.py" = ["D"] # Don't require docstrings in setup.py
  147. [tool.cibuildwheel]
  148. skip = ""
  149. environment = {PATH="$HOME/.cargo/bin:$PATH"}
  150. before-build = "pip install -U setuptools-rust && curl https://sh.rustup.rs -sSf | sh -s -- --profile=minimal -y && rustup show"
  151. [tool.cibuildwheel.linux]
  152. skip = "*-musllinux_*"
  153. archs = ["auto", "aarch64"]
  154. before-build = "pip install -U setuptools-rust && yum -y install libatomic && curl https://sh.rustup.rs -sSf | sh -s -- --profile=minimal -y && rustup show"
  155. [tool.cibuildwheel.macos]
  156. archs = ["auto", "universal2", "x86_64", "arm64"]
  157. before-all = "rustup target add x86_64-apple-darwin aarch64-apple-darwin"
  158. skip = """\
  159. cp310-macosx_x86_64 cp310-macosx_universal2 \
  160. cp311-macosx_x86_64 cp311-macosx_universal2 \
  161. cp312-macosx_x86_64 cp312-macosx_universal2 \
  162. cp313-macosx_x86_64 cp313-macosx_universal2 \
  163. """