diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index cbc3729..c28fa26 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -69,7 +69,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 0000000..72ce34a --- /dev/null +++ b/news/+setup-to-pyproject.internal @@ -0,0 +1,2 @@ +Move package metadata from ``setup.py`` to ``pyproject.toml``. +[plone devs] diff --git a/pyproject.toml b/pyproject.toml index a7f0e96..e47ab94 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,70 @@ [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.app.querystring" +version = "3.0.1.dev0" +description = "A queryparser, querybuilder and extra helper tools, to parse stored queries to actual results, used in new style Plone collections" +classifiers = [ + "Development Status :: 5 - Production/Stable", + "Framework :: Plone", + "Framework :: Plone :: 6.2", + "Framework :: Plone :: Core", + "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 = [ + "Products.GenericSetup", + "Zope", + "plone.app.contentlisting", + "plone.app.registry>=1.1", + "plone.app.vocabularies", + "plone.base", + "plone.batching", + "plone.i18n", + "plone.registry", + "plone.uuid", + "python-dateutil", + "zope.dottedname", + "zope.globalrequest", +] +keywords = ["collection", "queries"] + +[project.entry-points."plone.autoinclude.plugin"] +target = "plone" + +[project.optional-dependencies] +test = [ + "plone.app.content", + "plone.app.contenttypes[test]", + "plone.app.testing", +] + +[project.urls] +Source = "https://github.com/plone/plone.app.querystring" +Issues = "https://github.com/plone/Products.CMFPlone/issues" +Changelog = "https://github.com/plone/plone.app.querystring/blob/master/CHANGES.rst" +[tool.setuptools.dynamic] +readme = {file = ["README.rst", "CHANGES.rst"]} +# END-MARKER-MANUAL-CONFIG [tool.towncrier] directory = "news/" diff --git a/setup.py b/setup.py index 10b8dc3..d5dbbc6 100644 --- a/setup.py +++ b/setup.py @@ -1,64 +1,4 @@ from setuptools import setup -version = "3.0.1.dev0" - -long_description = open("README.rst").read() + "\n" -long_description += open("CHANGES.rst").read() - -setup( - name="plone.app.querystring", - version=version, - description=( - "A queryparser, querybuilder and extra helper tools, to " - "parse stored queries to actual results, used in " - "new style Plone collections" - ), - long_description=long_description, - classifiers=[ - "Development Status :: 5 - Production/Stable", - "Framework :: Plone", - "Framework :: Plone :: 6.2", - "Framework :: Plone :: Core", - "License :: OSI Approved :: GNU General Public License v2 (GPLv2)", - "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", - ], - keywords="collection queries", - author="Plone Foundation", - author_email="plone-developers@lists.sourceforge.net", - url="https://github.com/plone/plone.app.querystring", - license="GPL version 2", - include_package_data=True, - zip_safe=False, - python_requires=">=3.10", - install_requires=[ - "plone.app.contentlisting", - "plone.app.registry>=1.1", - "plone.app.vocabularies", - "plone.base", - "plone.batching", - "plone.i18n", - "plone.registry", - "plone.uuid", - "Products.GenericSetup", - "python-dateutil", - "Zope", - "zope.dottedname", - "zope.globalrequest", - ], - extras_require={ - "test": [ - "plone.app.content", - "plone.app.testing", - "plone.app.contenttypes[test]", - ] - }, - entry_points=""" - [z3c.autoinclude.plugin] - target = plone - """, -) +# See pyproject.toml for package metadata +setup()