Skip to content

Commit 4860153

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

4 files changed

Lines changed: 68 additions & 66 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: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,70 @@
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 = "borg.localrole"
13+
version = "5.0.1.dev0"
14+
description = "A PAS plugin which can manage local roles via an adapter lookup on the current context"
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+
"Intended Audience :: Other Audience",
22+
"Intended Audience :: System Administrators",
23+
"Operating System :: OS Independent",
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+
license = "LGPL-2.1-only"
33+
dynamic = ["readme"]
34+
requires-python = ">=3.10"
35+
authors = [
36+
{name = "Borg Collective",email = "borg@plone.org"},
37+
]
38+
maintainers = [
39+
{name = "Plone Foundation and contributors",email = "plone-developers@lists.sourceforge.net"},
40+
]
41+
dependencies = [
42+
"AccessControl",
43+
"Acquisition",
44+
"Products.CMFCore",
45+
"Products.GenericSetup",
46+
"Products.PlonePAS >= 5.0.1",
47+
"Products.PluggableAuthService",
48+
"Zope",
49+
"plone.memoize",
50+
"zope.annotation",
51+
"zope.component",
52+
"zope.deferredimport",
53+
"zope.interface",
54+
]
55+
keywords = ["Plone", "PAS", "local", "roles"]
56+
57+
[project.optional-dependencies]
58+
test = [
59+
"plone.app.testing",
60+
"plone.testing",
61+
]
62+
63+
[project.urls]
64+
Source = "https://github.com/plone/borg.localrole"
65+
Issues = "https://github.com/plone/Products.CMFPlone/issues"
66+
Changelog = "https://github.com/plone/borg.localrole/blob/main/CHANGES.rst"
767

68+
[tool.setuptools.dynamic]
69+
readme = {file = ["README.rst", "CHANGES.rst"]}
70+
# END-MARKER-MANUAL-CONFIG
871

972
[tool.towncrier]
1073
directory = "news/"

setup.py

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

4-
name = "borg.localrole"
5-
version = "5.0.1.dev0"
6-
7-
long_description = (
8-
f"{Path('README.rst').read_text()}\n{Path('CHANGES.rst').read_text()}"
9-
)
10-
11-
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-
],
67-
)
3+
# See pyproject.toml for package metadata
4+
setup()

0 commit comments

Comments
 (0)