Skip to content

Commit 3b7cc6a

Browse files
committed
feat: move metadata from setup.py to pyproject.toml.
1 parent 2798187 commit 3b7cc6a

4 files changed

Lines changed: 70 additions & 56 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: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,71 @@ requires = ["setuptools>=68.2,<83", "wheel"]
66

77

88

9+
# START-MARKER-MANUAL-CONFIG
10+
# Anything from here until END-MARKER-MANUAL-CONFIG
11+
# will be kept by plone.meta
12+
13+
[project]
14+
name = "borg.localrole"
15+
version = "5.0.1.dev0"
16+
description = "A PAS plugin which can manage local roles via an adapter lookup on the current context"
17+
classifiers = [
18+
"Development Status :: 5 - Production/Stable",
19+
"Environment :: Web Environment",
20+
"Framework :: Plone",
21+
"Framework :: Plone :: 6.2",
22+
"Framework :: Plone :: Core",
23+
"Intended Audience :: Other Audience",
24+
"Intended Audience :: System Administrators",
25+
"Operating System :: OS Independent",
26+
"Programming Language :: Python",
27+
"Programming Language :: Python :: 3.10",
28+
"Programming Language :: Python :: 3.11",
29+
"Programming Language :: Python :: 3.12",
30+
"Programming Language :: Python :: 3.13",
31+
"Programming Language :: Python :: 3.14",
32+
"Topic :: Software Development :: Libraries :: Python Modules",
33+
]
34+
license = "LGPL-2.1-only"
35+
dynamic = ["readme"]
36+
requires-python = ">=3.10"
37+
authors = [
38+
{name = "Borg Collective",email = "borg@plone.org"},
39+
]
40+
maintainers = [
41+
{name = "Plone Foundation and contributors",email = "plone-developers@lists.sourceforge.net"},
42+
]
43+
dependencies = [
44+
"AccessControl",
45+
"Acquisition",
46+
"Products.CMFCore",
47+
"Products.GenericSetup",
48+
"Products.PlonePAS >= 5.0.1",
49+
"Products.PluggableAuthService",
50+
"Zope",
51+
"plone.memoize",
52+
"zope.annotation",
53+
"zope.component",
54+
"zope.deferredimport",
55+
"zope.interface",
56+
]
57+
keywords = ["Plone", "PAS", "local", "roles"]
58+
59+
[project.optional-dependencies]
60+
test = [
61+
"plone.app.testing",
62+
"plone.testing",
63+
]
64+
65+
[project.urls]
66+
Source = "https://github.com/plone/borg.localrole"
67+
Issues = "https://github.com/plone/Products.CMFPlone/issues"
68+
Changelog = "https://github.com/plone/borg.localrole/blob/main/CHANGES.rst"
69+
70+
[tool.setuptools.dynamic]
71+
readme = {file = ["README.rst", "CHANGES.rst"]}
72+
# END-MARKER-MANUAL-CONFIG
73+
974
[tool.towncrier]
1075
directory = "news/"
1176
filename = "CHANGES.rst"

setup.py

Lines changed: 2 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -8,60 +8,7 @@
88
f"{Path('README.rst').read_text()}\n{Path('CHANGES.rst').read_text()}"
99
)
1010

11+
# See pyproject.toml for package metadata
1112
setup(
12-
name=name,
13-
version=version,
14-
description="A PAS plugin which can manage local roles via an "
15-
"adapter lookup on the current context",
16-
long_description=long_description,
17-
long_description_content_type="text/x-rst",
18-
keywords="Plone PAS local roles",
19-
author="Borg Collective",
20-
author_email="borg@plone.org",
21-
url="https://pypi.org/project/borg.localrole",
22-
license="LGPL",
23-
include_package_data=True,
24-
platforms="Any",
25-
zip_safe=False,
26-
python_requires=">=3.10",
27-
extras_require=dict(
28-
test=[
29-
"plone.app.testing",
30-
"plone.testing",
31-
],
32-
),
33-
install_requires=[
34-
"AccessControl",
35-
"zope.annotation",
36-
"zope.component",
37-
"zope.deferredimport",
38-
"zope.interface",
39-
"Products.CMFCore",
40-
"Products.GenericSetup",
41-
"Products.PlonePAS >= 5.0.1",
42-
"Products.PluggableAuthService",
43-
"plone.memoize",
44-
"Acquisition",
45-
"Zope",
46-
],
47-
# Get more strings from
48-
# https://pypi.org/classifiers/
49-
classifiers=[
50-
"Development Status :: 5 - Production/Stable",
51-
"Environment :: Web Environment",
52-
"Framework :: Plone",
53-
"Framework :: Plone :: 6.2",
54-
"Framework :: Plone :: Core",
55-
"Intended Audience :: Other Audience",
56-
"Intended Audience :: System Administrators",
57-
"License :: OSI Approved :: GNU Library or Lesser General Public License (LGPL)", # noqa
58-
"Operating System :: OS Independent",
59-
"Programming Language :: Python",
60-
"Programming Language :: Python :: 3.10",
61-
"Programming Language :: Python :: 3.11",
62-
"Programming Language :: Python :: 3.12",
63-
"Programming Language :: Python :: 3.13",
64-
"Programming Language :: Python :: 3.14",
65-
"Topic :: Software Development :: Libraries :: Python Modules",
66-
],
13+
platforms=Any,
6714
)

0 commit comments

Comments
 (0)