pyproject.toml 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153
  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 :: 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.9"
  25. dependencies = [
  26. "urllib3>=2.2.2",
  27. 'typing_extensions >=4.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.12.11",
  44. "mypy==1.17.1",
  45. "dissolve>=0.1.1",
  46. "codespell==2.4.1",
  47. ]
  48. merge = ["merge3"]
  49. fuzzing = ["atheris"]
  50. patiencediff = ["patiencediff"]
  51. [project.scripts]
  52. dulwich = "dulwich.cli:main"
  53. [tool.mypy]
  54. strict = true
  55. disallow_untyped_defs = true
  56. disallow_untyped_calls = true
  57. disallow_incomplete_defs = true
  58. check_untyped_defs = true
  59. disallow_untyped_decorators = true
  60. no_implicit_optional = true
  61. warn_redundant_casts = true
  62. warn_unused_ignores = true
  63. warn_return_any = true
  64. strict_equality = true
  65. ignore_missing_imports = true
  66. [[tool.mypy.overrides]]
  67. module = "atheris"
  68. ignore_missing_imports = true
  69. [[tool.mypy.overrides]]
  70. module = "fastimport"
  71. ignore_missing_imports = true
  72. [tool.setuptools]
  73. packages = [
  74. "dulwich",
  75. "dulwich.cloud",
  76. "dulwich.contrib",
  77. "dulwich.tests",
  78. ]
  79. include-package-data = true
  80. zip-safe = false
  81. script-files = [
  82. "bin/dul-receive-pack",
  83. "bin/dul-upload-pack",
  84. ]
  85. [tool.setuptools.dynamic]
  86. version = {attr = "dulwich.__version__"}
  87. [tool.ruff.lint]
  88. select = [
  89. "ANN",
  90. "D",
  91. "E",
  92. "F",
  93. "I",
  94. "PIE",
  95. "UP",
  96. "RSE",
  97. "RUF",
  98. ]
  99. ignore = [
  100. "ANN001",
  101. "ANN002",
  102. "ANN003",
  103. "ANN201",
  104. "ANN202",
  105. "ANN204",
  106. "ANN205",
  107. "ANN206",
  108. "E501", # line too long
  109. "UP007", # Use X | Y for type annotations (Python 3.10+ syntax, but we support 3.9+)
  110. ]
  111. [tool.ruff.lint.pydocstyle]
  112. convention = "google"
  113. [tool.ruff.lint.per-file-ignores]
  114. "tests/**/*.py" = ["D"] # Don't require docstrings in tests
  115. "fuzzing/**/*.py" = ["D"] # Don't require docstrings in fuzzing
  116. "examples/**/*.py" = ["D"] # Don't require docstrings in examples
  117. "devscripts/**/*.py" = ["D"] # Don't require docstrings in devscripts
  118. "docs/conf.py" = ["D"] # Don't require docstrings in docs config
  119. "setup.py" = ["D"] # Don't require docstrings in setup.py
  120. [tool.cibuildwheel]
  121. skip = "cp314-*"
  122. environment = {PATH="$HOME/.cargo/bin:$PATH"}
  123. before-build = "pip install -U setuptools-rust && curl https://sh.rustup.rs -sSf | sh -s -- --profile=minimal -y && rustup show"
  124. [tool.cibuildwheel.linux]
  125. skip = "*-musllinux_* cp314-*"
  126. archs = ["auto", "aarch64"]
  127. before-build = "pip install -U setuptools-rust && yum -y install libatomic && curl https://sh.rustup.rs -sSf | sh -s -- --profile=minimal -y && rustup show"
  128. [tool.cibuildwheel.macos]
  129. archs = ["auto", "universal2", "x86_64", "arm64"]
  130. before-all = "rustup target add x86_64-apple-darwin aarch64-apple-darwin"
  131. skip = """\
  132. cp39-macosx_x86_64 cp39-macosx_universal2 \
  133. cp310-macosx_x86_64 cp310-macosx_universal2 \
  134. cp311-macosx_x86_64 cp311-macosx_universal2 \
  135. cp312-macosx_x86_64 cp312-macosx_universal2 \
  136. cp313-macosx_x86_64 cp313-macosx_universal2 \
  137. cp314-macosx_x86_64 cp314-macosx_universal2 \
  138. """