Skip to content

Commit 7de2347

Browse files
committed
feat: move metadata from setup.py to pyproject.toml.
1 parent 388a60c commit 7de2347

4 files changed

Lines changed: 51 additions & 47 deletions

File tree

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ repos:
6969
rev: "0.24.2"
7070
hooks:
7171
- id: check-python-versions
72-
args: ['--only', 'setup.py,tox.ini']
72+
args: ['--only', 'pyproject.toml,tox.ini']
7373
- repo: https://github.com/collective/i18ndude
7474
rev: "6.3.0"
7575
hooks:

news/+setup-to-pyproject.internal

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Move package metadata from ``setup.py`` to ``pyproject.toml``.
2+
[plone devs]

pyproject.toml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,53 @@
44
[build-system]
55
requires = ["setuptools>=68.2,<83", "wheel"]
66

7+
# START-MARKER-MANUAL-CONFIG
8+
# Anything from here until END-MARKER-MANUAL-CONFIG
9+
# will be kept by plone.meta
10+
11+
[project]
12+
name = "plone.alterego"
13+
version = "3.0.1.dev0"
14+
description = "Low level support for dynamic modules"
15+
classifiers = [
16+
"Development Status :: 5 - Production/Stable",
17+
"Framework :: Plone",
18+
"Framework :: Plone :: 6.2",
19+
"Framework :: Plone :: Core",
20+
"Programming Language :: Python",
21+
"Programming Language :: Python :: 3.10",
22+
"Programming Language :: Python :: 3.11",
23+
"Programming Language :: Python :: 3.12",
24+
"Programming Language :: Python :: 3.13",
25+
"Programming Language :: Python :: 3.14",
26+
"Topic :: Software Development :: Libraries :: Python Modules",
27+
]
28+
license = "LGPL-2.1-only"
29+
dynamic = ["readme"]
30+
requires-python = ">=3.10"
31+
authors = [
32+
{name = "Laurence Rowe",email = "plone-developers@lists.sourceforge.net"},
33+
]
34+
maintainers = [
35+
{name = "Plone Foundation and contributors",email = "plone-developers@lists.sourceforge.net"},
36+
]
37+
dependencies = [
38+
"zope.component",
39+
"zope.interface",
40+
]
41+
keywords = ["Plone", "schema", "interface"]
42+
43+
[project.optional-dependencies]
44+
test = []
45+
46+
[project.urls]
47+
Source = "https://github.com/plone/plone.alterego"
48+
Issues = "https://github.com/plone/Products.CMFPlone/issues"
49+
Changelog = "https://github.com/plone/plone.alterego/blob/master/CHANGES.rst"
750

51+
[tool.setuptools.dynamic]
52+
readme = {file = ["README.rst", "CHANGES.rst"]}
53+
# END-MARKER-MANUAL-CONFIG
854

955
[tool.towncrier]
1056
directory = "news/"

setup.py

Lines changed: 2 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,4 @@
1-
from pathlib import Path
21
from setuptools import setup
32

4-
version = "3.0.1.dev0"
5-
6-
long_description = (
7-
f"{Path('README.rst').read_text()}\n{Path('CHANGES.rst').read_text()}"
8-
)
9-
10-
setup(
11-
name="plone.alterego",
12-
version=version,
13-
description="Low level support for dynamic modules",
14-
long_description=long_description,
15-
long_description_content_type="text/x-rst",
16-
# Get more strings from
17-
# https://pypi.org/classifiers/
18-
classifiers=[
19-
"Development Status :: 5 - Production/Stable",
20-
"Framework :: Plone",
21-
"Framework :: Plone :: 6.2",
22-
"Framework :: Plone :: Core",
23-
"License :: OSI Approved :: GNU Library or Lesser General Public License (LGPL)",
24-
"Programming Language :: Python",
25-
"Programming Language :: Python :: 3.10",
26-
"Programming Language :: Python :: 3.11",
27-
"Programming Language :: Python :: 3.12",
28-
"Programming Language :: Python :: 3.13",
29-
"Programming Language :: Python :: 3.14",
30-
"Topic :: Software Development :: Libraries :: Python Modules",
31-
],
32-
keywords="Plone schema interface",
33-
author="Laurence Rowe",
34-
author_email="plone-developers@lists.sourceforge.net",
35-
url="https://github.com/plone/plone.alterego",
36-
license="LGPL",
37-
include_package_data=True,
38-
zip_safe=False,
39-
python_requires=">=3.10",
40-
install_requires=[
41-
"zope.component",
42-
"zope.interface",
43-
],
44-
extras_require={"test": []},
45-
entry_points="""
46-
# -*- Entry points: -*-
47-
""",
48-
)
3+
# See pyproject.toml for package metadata
4+
setup()

0 commit comments

Comments
 (0)