201 lines
4.7 KiB
TOML
201 lines
4.7 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",
|
|
"License :: OSI Approved :: MIT License",
|
|
"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",
|
|
"Typing :: Typed",
|
|
]
|
|
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>=1.4; python_implementation == "CPython"',
|
|
'pytest-mypy-plugins; python_implementation == "CPython"',
|
|
]
|
|
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<7.2",
|
|
"zope.interface",
|
|
"sphinx-notfound-page",
|
|
"sphinxcontrib-towncrier",
|
|
"towncrier",
|
|
]
|
|
dev = ["attrs[tests]", "pre-commit"]
|
|
|
|
[project.urls]
|
|
Documentation = "https://www.attrs.org/"
|
|
Changelog = "https://www.attrs.org/en/stable/changelog.html"
|
|
GitHub = "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)
|
|
"""
|
|
|
|
|
|
[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:",
|
|
# not meant to be executed
|
|
': \.\.\.$',
|
|
'^ +\.\.\.$',
|
|
]
|
|
|
|
|
|
[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.ruff]
|
|
src = ["src", "tests", "conftest.py", "docs"]
|
|
|
|
[tool.ruff.per-file-ignores]
|
|
"tests/typing_example.py" = [
|
|
"E741", # ambiguous variable names don't matter in type checks
|
|
]
|
|
|
|
|
|
[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
|