|
1 | 1 | # SPDX-License-Identifier: MIT
|
2 | 2 |
|
3 | 3 | [build-system]
|
4 |
| -requires = ["setuptools>=40.6.0", "wheel"] |
5 |
| -build-backend = "setuptools.build_meta" |
| 4 | +requires = ["hatchling", "hatch-fancy-pypi-readme"] |
| 5 | +build-backend = "hatchling.build" |
| 6 | + |
| 7 | + |
| 8 | +[project] |
| 9 | +name = "attrs" |
| 10 | +version = "23.1.0.dev0" |
| 11 | +authors = [{ name = "Hynek Schlawack", email = "hs@ox.cx" }] |
| 12 | +license = "MIT" |
| 13 | +requires-python = ">=3.7" |
| 14 | +description = "Classes Without Boilerplate" |
| 15 | +keywords = ["class", "attribute", "boilerplate"] |
| 16 | +classifiers = [ |
| 17 | + "Development Status :: 5 - Production/Stable", |
| 18 | + "Intended Audience :: Developers", |
| 19 | + "Natural Language :: English", |
| 20 | + "License :: OSI Approved :: MIT License", |
| 21 | + "Operating System :: OS Independent", |
| 22 | + "Programming Language :: Python", |
| 23 | + "Programming Language :: Python :: 3", |
| 24 | + "Programming Language :: Python :: 3.7", |
| 25 | + "Programming Language :: Python :: 3.8", |
| 26 | + "Programming Language :: Python :: 3.9", |
| 27 | + "Programming Language :: Python :: 3.10", |
| 28 | + "Programming Language :: Python :: 3.11", |
| 29 | + "Programming Language :: Python :: Implementation :: CPython", |
| 30 | + "Programming Language :: Python :: Implementation :: PyPy", |
| 31 | + "Topic :: Software Development :: Libraries :: Python Modules", |
| 32 | +] |
| 33 | +dependencies = ["importlib_metadata;python_version<'3.8'"] |
| 34 | +dynamic = ["readme"] |
| 35 | + |
| 36 | +[project.optional-dependencies] |
| 37 | +tests-no-zope = [ |
| 38 | + # For regression test to ensure cloudpickle compat doesn't break. |
| 39 | + 'cloudpickle; python_implementation == "CPython"', |
| 40 | + "hypothesis", |
| 41 | + "pympler", |
| 42 | + # 4.3.0 dropped last use of `convert` |
| 43 | + "pytest>=4.3.0", |
| 44 | + "pytest-xdist[psutil]", |
| 45 | + # Since the mypy error messages keep changing, we have to keep updating this |
| 46 | + # pin. |
| 47 | + 'mypy>=0.971,<0.990; python_implementation == "CPython"', |
| 48 | + 'pytest-mypy-plugins; python_implementation == "CPython" and python_version<"3.11"', |
| 49 | +] |
| 50 | +tests = ["attrs[tests-no-zope]", "zope.interface"] |
| 51 | +cov = [ |
| 52 | + "attrs[tests]", |
| 53 | + # Ensure coverage is new enough for `source_pkgs`. |
| 54 | + "coverage>=5.3", |
| 55 | +] |
| 56 | +docs = [ |
| 57 | + "furo", |
| 58 | + "myst-parser", |
| 59 | + "sphinx", |
| 60 | + "zope.interface", |
| 61 | + "sphinx-notfound-page", |
| 62 | + "sphinxcontrib-towncrier", |
| 63 | + "towncrier", |
| 64 | +] |
| 65 | +dev = ["attrs[tests,docs]", "pre-commit"] |
| 66 | + |
| 67 | +[project.urls] |
| 68 | +Documentation = "https://www.attrs.org/" |
| 69 | +Changelog = "https://www.attrs.org/en/stable/changelog.html" |
| 70 | +"Bug Tracker" = "https://github.com/python-attrs/attrs/issues" |
| 71 | +"Source Code" = "https://github.com/python-attrs/attrs" |
| 72 | +Funding = "https://github.com/sponsors/hynek" |
| 73 | +Tidelift = "https://tidelift.com/subscription/pkg/pypi-attrs?utm_source=pypi-attrs&utm_medium=pypi" |
| 74 | +Ko-fi = "https://ko-fi.com/the_hynek" |
| 75 | + |
| 76 | + |
| 77 | +[tool.hatch.build.targets.wheel] |
| 78 | +packages = ["src/attr", "src/attrs"] |
| 79 | + |
| 80 | +[tool.hatch.metadata.hooks.fancy-pypi-readme] |
| 81 | +content-type = "text/markdown" |
| 82 | + |
| 83 | +# PyPI doesn't support the <picture> tag. |
| 84 | +[[tool.hatch.metadata.hooks.fancy-pypi-readme.fragments]] |
| 85 | +text = """<p align="center"> |
| 86 | + <a href="https://www.attrs.org/"> |
| 87 | + <img src="https://raw.githubusercontent.com/python-attrs/attrs/main/docs/_static/attrs_logo.svg" width="35%" alt="attrs" /> |
| 88 | + </a> |
| 89 | +</p> |
| 90 | +""" |
| 91 | + |
| 92 | +[[tool.hatch.metadata.hooks.fancy-pypi-readme.fragments]] |
| 93 | +path = "README.md" |
| 94 | +start-after = "<!-- teaser-begin -->" |
| 95 | + |
| 96 | +[[tool.hatch.metadata.hooks.fancy-pypi-readme.fragments]] |
| 97 | +text = """ |
| 98 | +
|
| 99 | +## Release Information |
| 100 | +
|
| 101 | +""" |
| 102 | + |
| 103 | +[[tool.hatch.metadata.hooks.fancy-pypi-readme.fragments]] |
| 104 | +path = "CHANGELOG.md" |
| 105 | +pattern = "\n(###.+?\n)## " |
| 106 | + |
| 107 | +[[tool.hatch.metadata.hooks.fancy-pypi-readme.fragments]] |
| 108 | +text = """ |
| 109 | +
|
| 110 | +--- |
| 111 | +
|
| 112 | +[Full changelog](https://www.attrs.org/en/stable/changelog.html) |
| 113 | +""" |
| 114 | + |
| 115 | + |
| 116 | +# Make coverage play nicely with pytest-xdist. |
| 117 | +[tool.hatch.build.targets.wheel.hooks.autorun] |
| 118 | +dependencies = ["hatch-autorun"] |
| 119 | +code = """ |
| 120 | +import coverage |
| 121 | +coverage.process_startup() |
| 122 | +""" |
| 123 | +enable-by-default = false |
6 | 124 |
|
7 | 125 |
|
8 | 126 | [tool.pytest.ini_options]
|
|
0 commit comments