Skip to content

Commit

Permalink
Modernize setuptools support to use pyproject.toml
Browse files Browse the repository at this point in the history
Replace the obsolete `setup.py` script and `setup.cfg` configuration
file with the modern PEP 621 `pyproject.toml` metadata.  This also
implies replacing the custom version/long-description grabbing logic
(that is broken with Python 3.12) with the features nowadays built-in
in setuptools.

Fixes Knio#172
  • Loading branch information
mgorny committed Oct 29, 2023
1 parent fe1f71e commit b96ae19
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 69 deletions.
42 changes: 42 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"

[project]
name = "dominate"
authors = [
{name = "Tom Flanagan", email = "[email protected]"},
{name = "Jake Wharton"},
]
description = "Dominate is a Python library for creating and manipulating HTML documents using an elegant DOM API."
readme = {file = "README.md", content-type = "text/markdown"}
requires-python = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*"
keywords = ["framework", "templating", "template", "html", "xhtml", "python", "html5"]
license = {text = "LGPL-3.0-or-newer"}
classifiers = [
"Intended Audience :: Developers",
"License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 2",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.4",
"Programming Language :: Python :: 3.5",
"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 :: Implementation :: PyPy",
"Topic :: Internet :: WWW/HTTP :: Dynamic Content",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Text Processing :: Markup :: HTML",
]
dynamic = ["version"]

[project.urls]
Homepage = "https://github.com/Knio/dominate/"

[tool.setuptools.dynamic]
version = {attr = "dominate._version.__version__"}
6 changes: 0 additions & 6 deletions setup.cfg

This file was deleted.

63 changes: 0 additions & 63 deletions setup.py

This file was deleted.

0 comments on commit b96ae19

Please sign in to comment.