From 23e3635188c4b0b3d6d0e6db2b044a855f898701 Mon Sep 17 00:00:00 2001 From: Gil Forcada Codinachs Date: Sat, 8 Aug 2026 23:32:22 +0200 Subject: [PATCH 1/2] feat: move metadata from setup.py to pyproject.toml. --- .pre-commit-config.yaml | 2 +- news/+setup-to-pyproject.internal | 1 + pyproject.toml | 84 +++++++++++++++++++++++++++++ setup.py | 90 +------------------------------ 4 files changed, 88 insertions(+), 89 deletions(-) create mode 100644 news/+setup-to-pyproject.internal diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 8db95272..3a9af3cd 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -70,7 +70,7 @@ repos: rev: "0.24.2" hooks: - id: check-python-versions - args: ['--only', 'setup.py,tox.ini'] + args: ['--only', 'pyproject.toml,tox.ini'] - repo: https://github.com/collective/i18ndude rev: "6.3.0" hooks: diff --git a/news/+setup-to-pyproject.internal b/news/+setup-to-pyproject.internal new file mode 100644 index 00000000..9af2a99a --- /dev/null +++ b/news/+setup-to-pyproject.internal @@ -0,0 +1 @@ +Move package metadata from `setup.py` to `pyproject.toml` @plone diff --git a/pyproject.toml b/pyproject.toml index d762fdfa..8a237db3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,91 @@ [build-system] requires = ["setuptools>=68.2,<83", "wheel"] +# START-MARKER-MANUAL-CONFIG +# Anything from here until END-MARKER-MANUAL-CONFIG +# will be kept by plone.meta +[project] +name = "plone.api" +version = "3.0.3.dev0" +description = "A Plone API." +classifiers = [ + "Development Status :: 5 - Production/Stable", + "Environment :: Web Environment", + "Framework :: Plone", + "Framework :: Plone :: 6.2", + "Framework :: Plone :: Core", + "Intended Audience :: Developers", + "Operating System :: OS Independent", + "Programming Language :: Python", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", + "Programming Language :: Python :: 3.14", +] +license = "GPL-2.0-only" +dynamic = ["readme"] +requires-python = ">=3.10" +authors = [ + {name = "Plone Foundation",email = "plone-developers@lists.sourceforge.net"}, +] +maintainers = [ + {name = "Plone Foundation and contributors",email = "plone-developers@lists.sourceforge.net"}, +] +dependencies = [ + "Acquisition", + "Products.CMFCore", + "Products.CMFPlone", + "Products.PlonePAS", + "Products.statusmessages", + "Zope", + "decorator", + "plone.app.dexterity", + "plone.app.intid", + "plone.app.linkintegrity", + "plone.app.users", + "plone.app.uuid", + "plone.base", + "plone.dexterity", + "plone.i18n", + "plone.registry", + "plone.supermodel", + "plone.uuid", + "z3c.relationfield", + "zc.relation", + "zope.globalrequest", + "zope.intid", +] +keywords = ["plone", "api"] + +[project.optional-dependencies] +test = [ + "borg.localrole", + "manuel>=1.11.2", + "packaging", + "plone.app.contenttypes", + "plone.app.testing", + "plone.app.textfield", + "plone.indexer", + "plone.registry", + "plone.testing", +] + +[project.urls] +Documentation = "https://6.docs.plone.org/plone.api/index.html" +Changelog = "https://github.com/plone/plone.api/blob/main/CHANGES.md" +Repository = "https://github.com/plone/plone.api" +Sponsor = "https://github.com/sponsors/plone" +Discord = "https://discord.com/channels/786421998426521600/786421998426521603" +Mastodon = "https://plone.social/@plone" +YouTube = "https://www.youtube.com/@plonecms" +Source = "https://github.com/plone/plone.api" +Issues = "https://github.com/plone/plone.api/issues" + +[tool.setuptools.dynamic] +readme = {file = ["README.md", "CHANGES.md"], content-type = "text/markdown"} +# END-MARKER-MANUAL-CONFIG [tool.towncrier] directory = "news/" diff --git a/setup.py b/setup.py index 23247100..d5dbbc6f 100644 --- a/setup.py +++ b/setup.py @@ -1,90 +1,4 @@ -from pathlib import Path from setuptools import setup -version = "3.0.3.dev0" - -long_description = "\n".join( - [Path("README.md").read_text(), Path("CHANGES.md").read_text()] -) - -setup( - name="plone.api", - version=version, - description="A Plone API.", - long_description=long_description, - long_description_content_type="text/markdown", - author="Plone Foundation", - author_email="plone-developers@lists.sourceforge.net", - license="GPL version 2", - include_package_data=True, - zip_safe=False, - url="https://github.com/plone/plone.api", - keywords="plone api", - python_requires=">=3.10", - install_requires=[ - "Acquisition", - "Products.statusmessages", - "Products.PlonePAS", - "Products.CMFPlone", - "decorator", - "plone.app.users", - "plone.app.uuid", - "plone.app.dexterity", - "plone.app.intid", - "plone.app.linkintegrity", - "plone.base", - "plone.dexterity", - "plone.i18n", - "plone.registry", - "plone.supermodel", - "plone.uuid", - "zope.globalrequest", - "Products.CMFCore", - "z3c.relationfield", - "zc.relation", - "Zope", - "zope.intid", - ], - extras_require={ - "test": [ - "borg.localrole", - "manuel>=1.11.2", - "packaging", - "plone.app.contenttypes", - "plone.app.textfield", - "plone.app.testing", - "plone.testing", - "plone.indexer", - "plone.registry", - ], - }, - # Get more strings from - # https://pypi.org/classifiers/ - classifiers=[ - "Development Status :: 5 - Production/Stable", - "Environment :: Web Environment", - "Framework :: Plone", - "Framework :: Plone :: 6.2", - "Framework :: Plone :: Core", - "Intended Audience :: Developers", - "License :: OSI Approved :: GNU General Public License v2 (GPLv2)", - "Operating System :: OS Independent", - "Programming Language :: Python", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "Programming Language :: Python :: 3.13", - "Programming Language :: Python :: 3.14", - ], - platforms="Any", - project_urls={ - "Documentation": "https://6.docs.plone.org/plone.api/index.html", - "Changelog": "https://github.com/plone/plone.api/blob/main/CHANGES.md", - "Issue Tracker": "https://github.com/plone/plone.api/issues", - "Repository": "https://github.com/plone/plone.api", - "Sponsor": "https://github.com/sponsors/plone", - "Discord": "https://discord.com/channels/786421998426521600/786421998426521603", - "Mastodon": "https://plone.social/@plone", - "YouTube": "https://www.youtube.com/@plonecms", - }, -) +# See pyproject.toml for package metadata +setup() From 011d9964a6af0084ce2df83b17618e7634c37178 Mon Sep 17 00:00:00 2001 From: Maurits van Rees Date: Tue, 8 Sep 2026 23:16:29 +0200 Subject: [PATCH 2/2] Fix links in readme --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index d9c86a64..704361a6 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,9 @@ # plone.api -[![Latest PyPI version](https://img.shields.io/pypi/v/plone.api.svg "Latest PyPI version")](https://pypi.python.org/pypi/plone.api/) +[![Latest PyPI version](https://img.shields.io/pypi/v/plone.api.svg "Latest PyPI version")](https://pypi.org/project/plone.api/) -[![Number of PyPI downloads](https://img.shields.io/pypi/dm/plone.api.svg "Number of PyPI downloads")](https://pypi.python.org/pypi/plone.api/) +[![Number of PyPI downloads](https://img.shields.io/pypi/dm/plone.api.svg "Number of PyPI downloads")](https://pypi.org/project/plone.api/) A simple API, built for humans wishing to develop with Plone. @@ -25,7 +25,7 @@ Recipes try to assume the user does not have extensive knowledge about Plone int ## Source Code and Contribution -[![Testing Status](https://github.com/plone/plone.api/actions/workflows/plone_python.yml/badge.svg "Testing Status")](https://github.com/plone/plone.api/actions/workflows/plone_python.yml) +[![Testing Status](https://github.com/plone/plone.api/actions/workflows/test-matrix.yml/badge.svg "Testing Status")](https://github.com/plone/plone.api/actions/workflows/test-matrix.yml) Contributors