Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop 3.6 & switch to 100% static packaging configuration #993

Merged
merged 9 commits into from Jan 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 2 additions & 3 deletions .github/workflows/ci.yml
Expand Up @@ -22,13 +22,12 @@ permissions:
jobs:
tests:
name: tox on ${{ matrix.python-version }}
runs-on: ubuntu-20.04
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
python-version:
- "3.6"
- "3.7"
- "3.8"
- "3.9"
Expand Down Expand Up @@ -133,7 +132,7 @@ jobs:
python-version: "3.10"

- run: python -m pip install --upgrade wheel tox
- run: python -m tox -e docs
- run: python -m tox -e docs,changelog

pyright:
name: Check types using pyright
Expand Down
25 changes: 0 additions & 25 deletions MANIFEST.in

This file was deleted.

2 changes: 0 additions & 2 deletions README.md
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
122 changes: 120 additions & 2 deletions pyproject.toml
@@ -1,8 +1,126 @@
# 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 = "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 = ["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.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]",
# 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.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]
Expand Down
163 changes: 0 additions & 163 deletions setup.py

This file was deleted.