Skip to content

Commit

Permalink
Switch to 100% static packaging configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
hynek committed Aug 6, 2022
1 parent 08f8319 commit e66f184
Show file tree
Hide file tree
Showing 10 changed files with 277 additions and 220 deletions.
1 change: 1 addition & 0 deletions .gitignore
@@ -1,5 +1,6 @@
*.egg-info
*.pyc
.DS_Store
.cache
.coverage*
.direnv
Expand Down
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Expand Up @@ -26,12 +26,12 @@ repos:
files: \.py$

- repo: https://github.com/asottile/yesqa
rev: v1.3.0
rev: v1.4.0
hooks:
- id: yesqa

- repo: https://github.com/PyCQA/flake8
rev: 5.0.2
rev: 5.0.4
hooks:
- id: flake8

Expand Down
2 changes: 1 addition & 1 deletion AUTHORS.rst
Expand Up @@ -3,7 +3,7 @@ Credits

``attrs`` is written and maintained by `Hynek Schlawack <https://hynek.me/>`_.

The development is kindly supported by `Variomedia AG <https://www.variomedia.de/>`_.
The development is kindly supported by `Variomedia AG <https://www.variomedia.de/>`_ and all my amazing `GitHub Sponsors <https://github.com/sponsors/hynek>`_.

A full list of contributors can be found in `GitHub's overview <https://github.com/python-attrs/attrs/graphs/contributors>`_.

Expand Down
24 changes: 0 additions & 24 deletions MANIFEST.in

This file was deleted.

161 changes: 133 additions & 28 deletions pyproject.toml
@@ -1,6 +1,111 @@
# 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 = "22.2.0.dev0"
authors = [{ name = "Hynek Schlawack", email = "hs@ox.cx" }]
requires-python = ">=3.6"
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.6",
"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"',
# 5.0 introduced toml; parallel was broken until 5.0.2
"coverage[toml]>=5.0.2",
"hypothesis",
"pympler",
# 4.3.0 dropped last use of `convert`
"pytest>=4.3.0",
# Since the mypy error messages keep changing, we have to keep updating this
# pin.
'mypy>=0.971; python_implementation == "CPython"',
'pytest-mypy-plugins; python_implementation == "CPython"',
]
tests = ["attrs[tests_no_zope]", "zope.interface"]
docs = ["furo", "sphinx", "zope.interface", "sphinx-notfound-page"]
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/x-rst"

[[tool.hatch.metadata.hooks.fancy-pypi-readme.fragments]]
text = """
.. image:: https://www.attrs.org/en/stable/_static/attrs_logo.png
:alt: attrs logo
:align: center
"""

[[tool.hatch.metadata.hooks.fancy-pypi-readme.fragments]]
path = "README.rst"
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.rst"
pattern = ".. towncrier release notes start\n\n(.*?)\n----\n"

[[tool.hatch.metadata.hooks.fancy-pypi-readme.fragments]]
text = """
`Full changelog <https://www.structlog.org/en/stable/changelog.html>`_
"""


[[tool.hatch.metadata.hooks.fancy-pypi-readme.fragments]]
path = "AUTHORS.rst"


[tool.coverage.run]
Expand Down Expand Up @@ -40,32 +145,32 @@ profile = "attrs"


[tool.towncrier]
package = "attr"
package_dir = "src"
filename = "CHANGELOG.rst"
template = "changelog.d/towncrier_template.rst"
issue_format = "`#{issue} <https://github.com/python-attrs/attrs/issues/{issue}>`_"
directory = "changelog.d"
title_format = "{version} ({project_date})"
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
package = "attr"
package_dir = "src"
filename = "CHANGELOG.rst"
template = "changelog.d/towncrier_template.rst"
issue_format = "`#{issue} <https://github.com/python-attrs/attrs/issues/{issue}>`_"
directory = "changelog.d"
title_format = "{version} ({project_date})"
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]
Expand Down
146 changes: 0 additions & 146 deletions setup.py

This file was deleted.

0 comments on commit e66f184

Please sign in to comment.