Skip to content

Commit 1ea8181

Browse files
committed
feat: move metadata from setup.py to pyproject.toml.
1 parent c9e12a8 commit 1ea8181

4 files changed

Lines changed: 61 additions & 58 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: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,63 @@
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.app.textfield"
13+
version = "4.0.2.dev0"
14+
description = "Text field with MIME type support"
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 = "GPL-2.0-only"
29+
dynamic = ["readme"]
30+
requires-python = ">=3.10"
31+
authors = [
32+
{name = "Martin Aspeli",email = "optilude@gmail.com"},
33+
]
34+
maintainers = [
35+
{name = "Plone Foundation and contributors",email = "plone-developers@lists.sourceforge.net"},
36+
]
37+
dependencies = [
38+
"Zope",
39+
"plone.base",
40+
]
41+
keywords = ["plone", "schema", "field"]
42+
43+
[project.optional-dependencies]
44+
portaltransforms = ["Products.PortalTransforms"]
45+
supermodel = ["plone.supermodel"]
46+
widget = ["z3c.form"]
47+
marshaler = ["plone.rfc822"]
48+
editor = ["plone.schemaeditor"]
49+
tests = [
50+
"lxml",
51+
"plone.app.testing",
52+
"plone.supermodel [test]",
53+
"plone.testing",
54+
]
55+
56+
[project.urls]
57+
Source = "https://github.com/plone/plone.app.textfield"
58+
Issues = "https://github.com/plone/Products.CMFPlone/issues"
59+
Changelog = "https://github.com/plone/plone.app.textfield/blob/master/CHANGES.rst"
760

61+
[tool.setuptools.dynamic]
62+
readme = {file = ["README.rst", "CHANGES.rst"]}
63+
# END-MARKER-MANUAL-CONFIG
864

965
[tool.towncrier]
1066
directory = "news/"

setup.py

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

4-
version = "4.0.2.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.app.textfield",
12-
version=version,
13-
description="Text field with MIME type support",
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 General Public License (GPL)",
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 field",
33-
author="Martin Aspeli",
34-
author_email="optilude@gmail.com",
35-
url="https://pypi.org/project/plone.app.textfield",
36-
license="GPL",
37-
include_package_data=True,
38-
zip_safe=False,
39-
python_requires=">=3.10",
40-
install_requires=[
41-
"plone.base",
42-
"Zope",
43-
],
44-
extras_require={
45-
"portaltransforms": ["Products.PortalTransforms"],
46-
"supermodel": ["plone.supermodel"],
47-
"widget": ["z3c.form"],
48-
"marshaler": ["plone.rfc822"],
49-
"editor": ["plone.schemaeditor"],
50-
"tests": [
51-
"lxml",
52-
"plone.app.testing",
53-
"plone.supermodel [test]",
54-
"plone.testing",
55-
],
56-
},
57-
entry_points="""
58-
""",
59-
)
3+
# See pyproject.toml for package metadata
4+
setup()

0 commit comments

Comments
 (0)