Skip to content

Commit 2bff772

Browse files
committed
feat: move metadata from setup.py to pyproject.toml.
1 parent f0f34f1 commit 2bff772

4 files changed

Lines changed: 50 additions & 45 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: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,52 @@
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.contentrules"
13+
version = "4.0.1.dev0"
14+
description = "Plone ContentRules Engine"
15+
classifiers = [
16+
"Development Status :: 5 - Production/Stable",
17+
"Environment :: Web Environment",
18+
"Framework :: Plone",
19+
"Framework :: Plone :: 6.2",
20+
"Framework :: Plone :: Core",
21+
"Framework :: Zope :: 5",
22+
"Operating System :: OS Independent",
23+
"Programming Language :: Python",
24+
"Programming Language :: Python :: 3.10",
25+
"Programming Language :: Python :: 3.11",
26+
"Programming Language :: Python :: 3.12",
27+
"Programming Language :: Python :: 3.13",
28+
"Programming Language :: Python :: 3.14",
29+
]
30+
license = "GPL-2.0-only"
31+
dynamic = ["readme"]
32+
requires-python = ">=3.10"
33+
authors = [
34+
{name = "Plone Foundation",email = "plone-developers@lists.sourceforge.net"},
35+
]
36+
maintainers = [
37+
{name = "Plone Foundation and contributors",email = "plone-developers@lists.sourceforge.net"},
38+
]
39+
dependencies = [
40+
"Zope",
41+
"zope.componentvocabulary",
42+
]
43+
keywords = ["Plone", "content", "rules", "events"]
44+
45+
[project.urls]
46+
Source = "https://github.com/plone/plone.contentrules"
47+
Issues = "https://github.com/plone/Products.CMFPlone/issues"
48+
Changelog = "https://github.com/plone/plone.contentrules/blob/master/CHANGES.rst"
749

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

954
[tool.towncrier]
1055
directory = "news/"

setup.py

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

4-
version = "4.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.contentrules",
12-
version=version,
13-
description="Plone ContentRules Engine",
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-
"Environment :: Web Environment",
21-
"Framework :: Plone",
22-
"Framework :: Plone :: 6.2",
23-
"Framework :: Plone :: Core",
24-
"Framework :: Zope :: 5",
25-
"License :: OSI Approved :: GNU General Public License v2 (GPLv2)",
26-
"Operating System :: OS Independent",
27-
"Programming Language :: Python",
28-
"Programming Language :: Python :: 3.10",
29-
"Programming Language :: Python :: 3.11",
30-
"Programming Language :: Python :: 3.12",
31-
"Programming Language :: Python :: 3.13",
32-
"Programming Language :: Python :: 3.14",
33-
],
34-
keywords="Plone content rules events",
35-
author="Plone Foundation",
36-
author_email="plone-developers@lists.sourceforge.net",
37-
url="https://pypi.org/project/plone.contentrules",
38-
license="GPL version 2",
39-
include_package_data=True,
40-
zip_safe=False,
41-
python_requires=">=3.10",
42-
install_requires=[
43-
"zope.componentvocabulary",
44-
"Zope",
45-
],
46-
)
3+
# See pyproject.toml for package metadata
4+
setup()

0 commit comments

Comments
 (0)