Skip to content

Commit

Permalink
Drop 3.6 & move to Hatch + static metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
hynek committed Dec 30, 2022
1 parent 88d2a37 commit a1f68bc
Show file tree
Hide file tree
Showing 10 changed files with 323 additions and 242 deletions.
1 change: 0 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ jobs:
fail-fast: false
matrix:
python-version:
- "3.6"
- "3.7"
- "3.8"
- "3.9"
Expand Down
25 changes: 0 additions & 25 deletions MANIFEST.in

This file was deleted.

2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
</a>
</p>

<!-- logo-end -->

<p align="center">
<a href="https://www.attrs.org/en/stable/">
<img src="https://img.shields.io/badge/Docs-RTD-black" alt="Documentation" />
Expand Down
114 changes: 112 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,118 @@
# SPDX-License-Identifier: MIT

[build-system]
requires = ["setuptools>=40.6.0", "wheel"]
build-backend = "setuptools.build_meta"
requires = ["hatchling", "hatch-fancy-pypi-readme"]
build-backend = "hatchling.build"


[project]
name = "attrs"
version = "23.1.0.dev0"
authors = [{ name = "Hynek Schlawack", email = "hs@ox.cx" }]
license = { file = "LICENSE" }
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 = ["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",
# Since the mypy error messages keep changing, we have to keep updating this
# pin.
'mypy>=0.971,<0.990; python_implementation == "CPython"',
'pytest-mypy-plugins; python_implementation == "CPython" and python_version<"3.11"',
]
tests = ["attrs[tests-no-zope]", "zope.interface"]
cov = [
"attrs[tests]",
# Makes coverage work with pytest-xdist.
"coverage-enable-subprocess",
# Ensure coverage is new enough for `source_pkgs`.
"coverage>=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"
Ko-fi = "https://ko-fi.com/the_hynek"


[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.structlog.org/en/stable/changelog.html)
"""


[tool.pytest.ini_options]
Expand Down
163 changes: 0 additions & 163 deletions setup.py

This file was deleted.

Loading

0 comments on commit a1f68bc

Please sign in to comment.