python-build/pyproject.toml

179 lines
4.4 KiB
TOML

[build-system]
requires = ["flit-core >= 3.8"]
build-backend = "flit_core.buildapi"
[project]
name = "build"
version = "1.0.3"
description = "A simple, correct Python build frontend"
readme = "README.md"
requires-python = ">= 3.7"
license.file = "LICENSE"
authors = [
{ name = "Filipe Laíns", email = "lains@riseup.net" },
{ name = "Bernát Gábor", email = "gaborjbernat@gmail.com" },
{ name = "layday", email = "layday@protonmail.com" },
{ name = "Henry Schreiner", email = "henryschreineriii@gmail.com" },
]
classifiers = [
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
]
urls.homepage = "https://github.com/pypa/build"
urls.changelog = "https://pypa-build.readthedocs.io/en/stable/changelog.html"
dependencies = [
"packaging >= 19.0",
"pyproject_hooks",
# not actually a runtime dependency, only supplied as there is not "recommended dependency" support
'colorama; os_name == "nt"',
'importlib-metadata >= 4.6; python_version < "3.10"', # Not required for 3.8+, but fixes a stdlib bug
'tomli >= 1.1.0; python_version < "3.11"',
]
[project.optional-dependencies]
docs = [
"furo >= 2023.08.17",
"sphinx ~= 7.0",
"sphinx-argparse-cli >= 1.5",
"sphinx-autodoc-typehints >= 1.10",
"sphinx-issues >= 3.0.0",
]
test = [
"filelock >= 3",
"pytest >= 6.2.4",
"pytest-cov >= 2.12",
"pytest-mock >= 2",
"pytest-rerunfailures >= 9.1",
"pytest-xdist >= 1.34",
"wheel >= 0.36.0",
'setuptools >= 42.0.0; python_version < "3.10"',
'setuptools >= 56.0.0; python_version == "3.10"',
'setuptools >= 56.0.0; python_version == "3.11"',
'setuptools >= 67.8.0; python_version >= "3.12"',
]
typing = [
"importlib-metadata >= 5.1",
"mypy ~= 1.5.0",
"tomli",
"typing-extensions >= 3.7.4.3",
]
virtualenv = [
"virtualenv >= 20.0.35",
]
[project.scripts]
pyproject-build = "build.__main__:entrypoint"
[project.entry-points."pipx.run"]
build = "build.__main__:entrypoint"
[tool.flit.sdist]
include = ["tests/", ".gitignore", "CHANGELOG.rst", "docs/", ".dockerignore", "tox.ini"]
exclude = ["**/__pycache__", "docs/_build", "**/*.egg-info", "tests/packages/*/build"]
[tool.coverage.run]
source = [
"build",
"tests",
]
[tool.coverage.report]
exclude_lines = [
'\#\s*pragma: no cover',
'^\s*raise NotImplementedError\b',
"if typing.TYPE_CHECKING:",
]
[tool.coverage.paths]
build = [
"src",
"*/site-packages",
'*\site-packages',
]
[tool.coverage.html]
show_contexts = true
[tool.pytest.ini_options]
minversion = "6.0"
addopts = ["--strict-config", "--strict-markers"]
log_cli_level = "info"
testpaths = ["tests"]
xfail_strict = true
junit_family = "xunit2"
norecursedirs = "tests/integration/*"
markers = [
"isolated",
"pypy3323bug",
"network",
]
filterwarnings = [
"error",
"ignore:path is deprecated.:DeprecationWarning",
"ignore:The --rsyncdir command line argument and rsyncdirs config variable are deprecated.:DeprecationWarning",
"default:Python 3.14 will, by default, filter extracted tar archives:DeprecationWarning",
]
[tool.mypy]
files = "src"
python_version = "3.7"
strict = true
show_error_codes = true
enable_error_code = ["ignore-without-code", "truthy-bool", "redundant-expr"]
[[tool.mypy.overrides]]
module = [
"colorama", # Optional dependency
"pyproject_hooks.*", # Untyped
"virtualenv", # Optional dependency
]
ignore_missing_imports = true
[tool.black]
line-length = 127
skip-string-normalization = true
[tool.ruff]
line-length = 127
exclude = ["tests/packages/test-bad-syntax"]
select = [
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"C9", # mccabe
"E", # pycodestyle
"F", # pyflakes
"I", # isort
"PGH", # pygrep-hooks
"RUF", # ruff
"UP", # pyupgrade
"W", # pycodestyle
"YTT", # flake8-2020
"TRY", # tryceratops
"EM", # flake8-errmsg
]
src = ["src"]
[tool.ruff.mccabe]
max-complexity = 10
[tool.ruff.isort]
lines-between-types = 1
lines-after-imports = 2
known-first-party = ["build"]
[tool.check-wheel-contents]
ignore = [
"W005", # We _are_ build
]