| 1 |
[build-system] |
| 2 |
requires = ["flit-core >= 3.11"] |
| 3 |
build-backend = "flit_core.buildapi" |
| 4 |
|
| 5 |
[project] |
| 6 |
name = "build" |
| 7 |
description = "A simple, correct Python build frontend" |
| 8 |
readme = "README.md" |
| 9 |
requires-python = ">= 3.10" |
| 10 |
license = "MIT" |
| 11 |
authors = [ |
| 12 |
{ name = "Filipe Laíns", email = "[email protected]" }, |
| 13 |
{ name = "Bernát Gábor", email = "[email protected]" }, |
| 14 |
{ name = "layday", email = "[email protected]" }, |
| 15 |
{ name = "Henry Schreiner", email = "[email protected]" }, |
| 16 |
] |
| 17 |
classifiers = [ |
| 18 |
"Programming Language :: Python :: 3", |
| 19 |
"Programming Language :: Python :: 3 :: Only", |
| 20 |
|
| 21 |
"Programming Language :: Python :: 3.10", |
| 22 |
"Programming Language :: Python :: 3.11", |
| 23 |
"Programming Language :: Python :: 3.12", |
| 24 |
"Programming Language :: Python :: 3.13", |
| 25 |
"Programming Language :: Python :: 3.14", |
| 26 |
"Programming Language :: Python :: 3.15", |
| 27 |
"Programming Language :: Python :: Implementation :: CPython", |
| 28 |
"Programming Language :: Python :: Implementation :: PyPy", |
| 29 |
] |
| 30 |
urls.changelog = "https://build.pypa.io/en/stable/changelog.html" |
| 31 |
urls.homepage = "https://build.pypa.io" |
| 32 |
urls.issues = "https://github.com/pypa/build/issues" |
| 33 |
urls.source = "https://github.com/pypa/build" |
| 34 |
# Version read from __version__ field in __init__.py by Flit |
| 35 |
dynamic = ["version"] |
| 36 |
dependencies = [ |
| 37 |
"packaging >= 24.0", |
| 38 |
"pyproject_hooks", |
| 39 |
# not actually a runtime dependency, only supplied as there is not "recommended dependency" support |
| 40 |
'colorama; os_name == "nt"', |
| 41 |
'importlib-metadata >= 4.6; python_full_version < "3.10.2"', # Not required but fixes a stdlib bug |
| 42 |
'tomli >= 1.1.0; python_version < "3.11"', |
| 43 |
] |
| 44 |
|
| 45 |
[project.optional-dependencies] |
| 46 |
uv = [ |
| 47 |
"uv >= 0.1.18", |
| 48 |
] |
| 49 |
keyring = [ |
| 50 |
"keyring", |
| 51 |
] |
| 52 |
virtualenv = [ |
| 53 |
"virtualenv >= 20.36.1", |
| 54 |
] |
| 55 |
|
| 56 |
[project.scripts] |
| 57 |
pyproject-build = "build.__main__:entrypoint" |
| 58 |
|
| 59 |
[project.entry-points."pipx.run"] |
| 60 |
build = "build.__main__:entrypoint" |
| 61 |
|
| 62 |
[dependency-groups] |
| 63 |
extra = [ |
| 64 |
"uv >= 0.1.18", |
| 65 |
"virtualenv >= 20.36.1", |
| 66 |
] |
| 67 |
lint = [ |
| 68 |
"prek", |
| 69 |
] |
| 70 |
coverage = [ |
| 71 |
"covdefaults >= 2.3", |
| 72 |
"coverage[toml] >= 6.0", |
| 73 |
"diff_cover >= 6.4.2", |
| 74 |
] |
| 75 |
bump = [ |
| 76 |
"bump-my-version >= 0.10", |
| 77 |
] |
| 78 |
docs = [ |
| 79 |
"furo >= 2025.12.19", |
| 80 |
"pre-commit >= 3.0", |
| 81 |
"proselint >= 0.16", |
| 82 |
"sphinx >= 8.1", |
| 83 |
"sphinx-argparse-cli >= 1.17", |
| 84 |
"sphinx-autodoc-typehints >= 2.3", |
| 85 |
"sphinx-copybutton >= 0.5.2", |
| 86 |
"sphinx-inline-tabs >= 2025.12.21", |
| 87 |
"sphinx-issues >= 5.0", |
| 88 |
"sphinxcontrib-mermaid >= 2.0", |
| 89 |
"towncrier >= 24.8", |
| 90 |
] |
| 91 |
test-core = [ |
| 92 |
"pytest >= 6.2.5, != 9.1.0", |
| 93 |
"pytest-cov >= 3.0.0", |
| 94 |
"pytest-mock >= 3.7.0", |
| 95 |
"pytest-rerunfailures >= 10.2", |
| 96 |
"pytest-xdist >= 2.4.0", |
| 97 |
] |
| 98 |
test = [ |
| 99 |
"filelock >= 3.4.0", |
| 100 |
"covdefaults >= 2.3", |
| 101 |
"wheel >= 0.38.1", |
| 102 |
'setuptools >= 56.0.0; python_version == "3.10"', |
| 103 |
'setuptools >= 56.0.0; python_version == "3.11"', |
| 104 |
'setuptools >= 67.8.0; python_version >= "3.12"', |
| 105 |
"setuptools_scm >= 6.4.2", |
| 106 |
"pip >= 22.3", |
| 107 |
{ include-group = "test-core" }, |
| 108 |
{ include-group = "extra" }, |
| 109 |
] |
| 110 |
typing = [ |
| 111 |
"importlib-metadata >= 5.1", |
| 112 |
"tomli", |
| 113 |
"typing-extensions >= 4.0.0", |
| 114 |
"types-colorama", |
| 115 |
{ include-group = "test-core" }, |
| 116 |
{ include-group = "extra" }, |
| 117 |
] |
| 118 |
mypy = [ |
| 119 |
"mypy ~= 2.1.0", |
| 120 |
{ include-group = "typing" }, |
| 121 |
] |
| 122 |
release = [ |
| 123 |
"gitpython >= 3.1.44", |
| 124 |
"packaging >= 25", |
| 125 |
"pre-commit >= 3.0", |
| 126 |
"towncrier >= 24.8", |
| 127 |
] |
| 128 |
dev = [ |
| 129 |
"flit-core", |
| 130 |
{ include-group = "test" }, |
| 131 |
{ include-group = "mypy" }, |
| 132 |
] |
| 133 |
|
| 134 |
[tool.flit.sdist] |
| 135 |
include = ["tests/", ".gitignore", "CHANGELOG.rst", "docs/", ".dockerignore", "tox.toml"] |
| 136 |
exclude = [ |
| 137 |
"**/__pycache__", |
| 138 |
"docs/_build", |
| 139 |
"**/*.egg-info", |
| 140 |
"tests/packages/*/build", |
| 141 |
"docs/changelog/template.jinja2", |
| 142 |
"tasks/*", |
| 143 |
] |
| 144 |
|
| 145 |
[tool.uv] |
| 146 |
exclude-newer = "7 days" |
| 147 |
|
| 148 |
|
| 149 |
[tool.coverage] |
| 150 |
run.plugins = ["covdefaults"] |
| 151 |
run.source = ["build", "tests"] |
| 152 |
run.omit = ["tests/conftest.py", "tests/test_integration.py",] |
| 153 |
report.omit = ["src/build/_types.py"] |
| 154 |
run.disable_warnings = [ |
| 155 |
"module-not-measured", # Triggers in multithreaded context on build |
| 156 |
"no-sysmon", |
| 157 |
] |
| 158 |
covdefaults.subtract_omit = "*/__main__.py" |
| 159 |
report.exclude_also = [ |
| 160 |
"if typing.TYPE_CHECKING:", |
| 161 |
] |
| 162 |
paths.build = [ |
| 163 |
"src", |
| 164 |
"*/site-packages", |
| 165 |
'*\site-packages', |
| 166 |
] |
| 167 |
html.show_contexts = true |
| 168 |
|
| 169 |
[tool.pytest.ini_options] |
| 170 |
minversion = "6.0" |
| 171 |
addopts = ["-ra", "--strict-config", "--strict-markers"] |
| 172 |
log_level = "INFO" |
| 173 |
testpaths = ["tests"] |
| 174 |
xfail_strict = true |
| 175 |
junit_family = "xunit2" |
| 176 |
norecursedirs = "tests/integration/*" |
| 177 |
markers = [ |
| 178 |
"contextvars", |
| 179 |
"isolated", |
| 180 |
"pypy3323bug", |
| 181 |
"network", |
| 182 |
] |
| 183 |
filterwarnings = [ |
| 184 |
"error", |
| 185 |
"ignore:path is deprecated.:DeprecationWarning", |
| 186 |
"ignore:The --rsyncdir command line argument and rsyncdirs config variable are deprecated.:DeprecationWarning", |
| 187 |
"ignore:check_home argument is deprecated and ignored:DeprecationWarning:", # PyPy 3.11 |
| 188 |
"default:Python 3.14 will, by default, filter extracted tar archives:DeprecationWarning", |
| 189 |
"default:unclosed:ResourceWarning", # Python 3.11 Windows |
| 190 |
"ignore:os.path.commonprefix:DeprecationWarning" # https://github.com/pypa/pyproject-hooks/pull/222 |
| 191 |
] |
| 192 |
|
| 193 |
[tool.mypy] |
| 194 |
files = ["src", "tests"] |
| 195 |
exclude = ["tests/packages"] |
| 196 |
python_version = "3.10" |
| 197 |
strict = true |
| 198 |
disallow_any_explicit = true |
| 199 |
enable_error_code = ["ignore-without-code", "truthy-bool", "redundant-expr"] |
| 200 |
warn_unreachable = true |
| 201 |
|
| 202 |
[[tool.mypy.overrides]] |
| 203 |
module = [ |
| 204 |
"virtualenv", # Optional dependency |
| 205 |
] |
| 206 |
ignore_missing_imports = true |
| 207 |
|
| 208 |
[tool.ruff] |
| 209 |
exclude = [ |
| 210 |
"tests/packages/*/pyproject.toml", |
| 211 |
"tests/packages/test-bad-syntax", |
| 212 |
] |
| 213 |
line-length = 127 |
| 214 |
|
| 215 |
[tool.ruff.format] |
| 216 |
quote-style = "single" |
| 217 |
|
| 218 |
[tool.ruff.lint] |
| 219 |
select = ["ALL"] |
| 220 |
ignore = [ |
| 221 |
"A002", # Arguments can shadow builtins |
| 222 |
"ANN401", # Disallow Any |
| 223 |
"BLE001", # Blind exceptions are fine if re-raised or passed on |
| 224 |
"COM812", # Trailing commas teach the formatter |
| 225 |
"D", # Too many doc requests |
| 226 |
"ERA", # Commented out code |
| 227 |
"FBT", # Boolean trap hard to fix on existing API |
| 228 |
"N818", # Using Exception suffix |
| 229 |
"PLC0415", # Import should be at top of file |
| 230 |
"PLR09", # Too many ... |
| 231 |
"PLR2004", # Magic values |
| 232 |
"PTH", # Too many change for now |
| 233 |
"Q", # Using formatter for quotes |
| 234 |
"S101", # Assert is used by mypy and pytest |
| 235 |
"SLF001", # Private members are okay to access |
| 236 |
] |
| 237 |
|
| 238 |
|
| 239 |
|
| 240 |
[tool.ruff.lint.flake8-tidy-imports.banned-api] |
| 241 |
"typing.TYPE_CHECKING".msg = "Use TYPE_CHECKING=False instead" |
| 242 |
"os.path.commonprefix".msg = "Use os.path.commonpath or manually implement string manip" |
| 243 |
|
| 244 |
[tool.ruff.lint.per-file-ignores] |
| 245 |
"tasks/**.py" = ["T20", "INP", "S607"] |
| 246 |
"tests/**.py" = ["TID251", "TC", "T20", "INP", "S"] |
| 247 |
"tests/packages/**.py" = ["ANN", "INP", "ARG001"] |
| 248 |
"docs/**.py" = ["INP", "A001"] |
| 249 |
|
| 250 |
[tool.ruff.lint.mccabe] |
| 251 |
max-complexity = 10 |
| 252 |
|
| 253 |
[tool.ruff.lint.isort] |
| 254 |
lines-between-types = 1 |
| 255 |
lines-after-imports = 2 |
| 256 |
|
| 257 |
[tool.check-wheel-contents] |
| 258 |
ignore = [ |
| 259 |
"W005", # We _are_ build |
| 260 |
] |
| 261 |
|
| 262 |
[tool.repo-review] |
| 263 |
ignore = ["PC140"] # mypy in tox |
| 264 |
|
| 265 |
|
| 266 |
[tool.towncrier] |
| 267 |
name = "build" |
| 268 |
filename = "CHANGELOG.rst" |
| 269 |
directory = "docs/changelog" |
| 270 |
title_format = false |
| 271 |
issue_format = ":issue:`{issue}`" |
| 272 |
template = "docs/changelog/template.jinja2" |
| 273 |
underlines = ["#", "*", "=", "-"] |
| 274 |
|
| 275 |
[[tool.towncrier.section]] |
| 276 |
path = "" |
| 277 |
|
| 278 |
[[tool.towncrier.type]] |
| 279 |
directory = "feature" |
| 280 |
name = "Features" |
| 281 |
showcontent = true |
| 282 |
|
| 283 |
[[tool.towncrier.type]] |
| 284 |
directory = "bugfix" |
| 285 |
name = "Bugfixes" |
| 286 |
showcontent = true |
| 287 |
|
| 288 |
[[tool.towncrier.type]] |
| 289 |
directory = "doc" |
| 290 |
name = "Documentation" |
| 291 |
showcontent = true |
| 292 |
|
| 293 |
[[tool.towncrier.type]] |
| 294 |
directory = "removal" |
| 295 |
name = "Deprecations and Removals" |
| 296 |
showcontent = true |
| 297 |
|
| 298 |
[[tool.towncrier.type]] |
| 299 |
directory = "misc" |
| 300 |
name = "Miscellaneous" |
| 301 |
showcontent = false |
| 302 |
|
| 303 |
[tool.bumpversion] |
| 304 |
current_version = "1.0.0" |
| 305 |
|
| 306 |
[[tool.bumpversion.files]] |
| 307 |
filename = "pyproject.toml" |
| 308 |
search = 'version = "{current_version}"' |
| 309 |
|
| 310 |
[[tool.bumpversion.files]] |
| 311 |
filename = "src/build/__init__.py" |
| 312 |
search = "__version__ = '{current_version}'" |