attrs/pyproject.toml

203 lines
5.0 KiB
TOML

# SPDX-License-Identifier: MIT
[build-system]
requires = ["hatchling", "hatch-vcs", "hatch-fancy-pypi-readme"]
build-backend = "hatchling.build"
[project]
name = "attrs"
authors = [{ name = "Hynek Schlawack", email = "hs@ox.cx" }]
license = "MIT"
requires-python = ">=3.7"
description = "Classes Without Boilerplate"
keywords = ["class", "attribute", "boilerplate"]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Natural Language :: English",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"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 :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
"Topic :: Software Development :: Libraries :: Python Modules",
]
dependencies = ["importlib_metadata;python_version<'3.8'"]
dynamic = ["version", "readme"]
[project.optional-dependencies]
tests-no-zope = [
# For regression test to ensure cloudpickle compat doesn't break.
'cloudpickle; python_implementation == "CPython"',
"hypothesis",
"pympler",
# 4.3.0 dropped last use of `convert`
"pytest>=4.3.0",
"pytest-xdist[psutil]",
# Since the mypy error messages keep changing, we have to keep updating this
# pin.
'mypy>=0.991; python_implementation == "CPython"',
'pytest-mypy-plugins; python_implementation == "CPython" and python_version<"3.11"',
]
tests = ["attrs[tests-no-zope]", "zope.interface"]
cov = [
"attrs[tests]",
# Ensure coverage is new enough for `source_pkgs`.
"coverage[toml]>=5.3",
]
docs = [
"furo",
"myst-parser",
"sphinx",
"zope.interface",
"sphinx-notfound-page",
"sphinxcontrib-towncrier",
"towncrier",
]
dev = ["attrs[tests,docs]", "pre-commit"]
[project.urls]
Documentation = "https://www.attrs.org/"
Changelog = "https://www.attrs.org/en/stable/changelog.html"
"Bug Tracker" = "https://github.com/python-attrs/attrs/issues"
"Source Code" = "https://github.com/python-attrs/attrs"
Funding = "https://github.com/sponsors/hynek"
Tidelift = "https://tidelift.com/subscription/pkg/pypi-attrs?utm_source=pypi-attrs&utm_medium=pypi"
[tool.hatch.version]
source = "vcs"
raw-options = { local_scheme = "no-local-version" }
[tool.hatch.build.targets.wheel]
packages = ["src/attr", "src/attrs"]
[tool.hatch.metadata.hooks.fancy-pypi-readme]
content-type = "text/markdown"
# PyPI doesn't support the <picture> tag.
[[tool.hatch.metadata.hooks.fancy-pypi-readme.fragments]]
text = """<p align="center">
<a href="https://www.attrs.org/">
<img src="https://raw.githubusercontent.com/python-attrs/attrs/main/docs/_static/attrs_logo.svg" width="35%" alt="attrs" />
</a>
</p>
"""
[[tool.hatch.metadata.hooks.fancy-pypi-readme.fragments]]
path = "README.md"
start-after = "<!-- teaser-begin -->"
[[tool.hatch.metadata.hooks.fancy-pypi-readme.fragments]]
text = """
## Release Information
"""
[[tool.hatch.metadata.hooks.fancy-pypi-readme.fragments]]
path = "CHANGELOG.md"
pattern = "\n(###.+?\n)## "
[[tool.hatch.metadata.hooks.fancy-pypi-readme.fragments]]
text = """
---
[Full changelog](https://www.attrs.org/en/stable/changelog.html)
"""
# Make coverage play nicely with pytest-xdist.
[tool.hatch.build.targets.wheel.hooks.autorun]
dependencies = ["hatch-autorun"]
code = """
import coverage
coverage.process_startup()
"""
enable-by-default = false
[tool.pytest.ini_options]
addopts = ["-ra", "--strict-markers", "--strict-config"]
xfail_strict = true
testpaths = "tests"
filterwarnings = ["once::Warning", "ignore:::pympler[.*]"]
[tool.coverage.run]
parallel = true
branch = true
source_pkgs = ["attr", "attrs"]
[tool.coverage.paths]
source = ["src", ".tox/py*/**/site-packages"]
[tool.coverage.report]
show_missing = true
skip_covered = true
exclude_lines = [
"pragma: no cover",
# PyPy is unacceptably slow under coverage.
"if PYPY:",
]
[tool.black]
line-length = 79
[tool.isort]
profile = "attrs"
[tool.interrogate]
verbose = 2
fail-under = 100
whitelist-regex = ["test_.*"]
[tool.check-wheel-contents]
toplevel = ["attr", "attrs"]
[tool.towncrier]
name = "attrs"
directory = "changelog.d"
filename = "CHANGELOG.md"
start_string = "<!-- towncrier release notes start -->\n"
template = "changelog.d/towncrier_template.md.jinja"
title_format = ""
issue_format = "[#{issue}](https://github.com/python-attrs/attrs/issues/{issue})"
underlines = ["", "", ""]
[[tool.towncrier.section]]
path = ""
[[tool.towncrier.type]]
directory = "breaking"
name = "Backwards-incompatible Changes"
showcontent = true
[[tool.towncrier.type]]
directory = "deprecation"
name = "Deprecations"
showcontent = true
[[tool.towncrier.type]]
directory = "change"
name = "Changes"
showcontent = true
[tool.mypy]
disallow_untyped_defs = true
check_untyped_defs = true