From f59a05feed4b731f484638a4a0ce695d03caaec0 Mon Sep 17 00:00:00 2001 From: Jens Vagelpohl Date: Sun, 30 Nov 2025 17:43:01 +0100 Subject: [PATCH 1/2] - Move package metadata from setup.py to pyproject.toml --- .editorconfig | 6 ++-- .github/workflows/pre-commit.yml | 6 ++-- .github/workflows/tests.yml | 10 +++---- .gitignore | 4 +-- .meta.toml | 6 ++-- .pre-commit-config.yaml | 4 +-- CHANGES.rst | 2 ++ CONTRIBUTING.md | 4 +-- MANIFEST.in | 4 +-- pyproject.toml | 50 ++++++++++++++++++++++++++++++-- setup.cfg | 4 +-- setup.py | 48 ++---------------------------- tox.ini | 4 +-- 13 files changed, 77 insertions(+), 75 deletions(-) diff --git a/.editorconfig b/.editorconfig index ce35108..9aea56f 100644 --- a/.editorconfig +++ b/.editorconfig @@ -1,5 +1,5 @@ -# Generated from: -# https://github.com/zopefoundation/meta/tree/master/config/zope-product +# Generated with zope.meta (https://zopemeta.readthedocs.io/) from: +# https://github.com/zopefoundation/meta/tree/master/src/zope/meta/zope-product # # EditorConfig Configuration file, for more details see: # https://EditorConfig.org @@ -12,7 +12,7 @@ root = true -[*] # For All Files +[*] # Unix-style newlines with a newline ending every file end_of_line = lf insert_final_newline = true diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index cf37dd3..892c4fd 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -1,5 +1,5 @@ -# Generated from: -# https://github.com/zopefoundation/meta/tree/master/config/zope-product +# Generated with zope.meta (https://zopemeta.readthedocs.io/) from: +# https://github.com/zopefoundation/meta/tree/master/src/zope/meta/zope-product name: pre-commit on: @@ -21,7 +21,7 @@ jobs: name: linting runs-on: ubuntu-latest steps: - - uses: actions/checkout@v5 + - uses: actions/checkout@v6 - uses: actions/setup-python@v6 with: python-version: '3.13' diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 0fe597d..2872872 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -1,5 +1,5 @@ -# Generated from: -# https://github.com/zopefoundation/meta/tree/master/config/zope-product +# Generated with zope.meta (https://zopemeta.readthedocs.io/) from: +# https://github.com/zopefoundation/meta/tree/master/src/zope/meta/zope-product name: tests on: @@ -35,12 +35,12 @@ jobs: if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name name: ${{ matrix.config[1] }} steps: - - uses: actions/checkout@v5 + - uses: actions/checkout@v6 with: persist-credentials: false - name: Install uv + caching - # astral/setup-uv@7.1.3 - uses: astral-sh/setup-uv@5a7eac68fb9809dea845d802897dc5c723910fa3 + # astral/setup-uv@7.1.4 + uses: astral-sh/setup-uv@1e862dfacbd1d6d858c55d9b792c756523627244 with: enable-cache: true cache-dependency-glob: | diff --git a/.gitignore b/.gitignore index ce7f677..2237713 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,5 @@ -# Generated from: -# https://github.com/zopefoundation/meta/tree/master/config/zope-product +# Generated with zope.meta (https://zopemeta.readthedocs.io/) from: +# https://github.com/zopefoundation/meta/tree/master/src/zope/meta/zope-product *.dll *.egg-info/ *.profraw diff --git a/.meta.toml b/.meta.toml index 054e7d1..6bd25f3 100644 --- a/.meta.toml +++ b/.meta.toml @@ -1,8 +1,8 @@ -# Generated from: -# https://github.com/zopefoundation/meta/tree/master/config/zope-product +# Generated with zope.meta (https://zopemeta.readthedocs.io/) from: +# https://github.com/zopefoundation/meta/tree/master/src/zope/meta/zope-product [meta] template = "zope-product" -commit-id = "9fcd3d67" +commit-id = "446e9797" [python] with-pypy = false diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index cdeaf6c..de48184 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,5 +1,5 @@ -# Generated from: -# https://github.com/zopefoundation/meta/tree/master/config/zope-product +# Generated with zope.meta (https://zopemeta.readthedocs.io/) from: +# https://github.com/zopefoundation/meta/tree/master/src/zope/meta/zope-product minimum_pre_commit_version: '3.6' repos: - repo: https://github.com/pycqa/isort diff --git a/CHANGES.rst b/CHANGES.rst index 5879477..447ed35 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -4,6 +4,8 @@ Changelog 5.1 (unreleased) ---------------- +- Move package metadata from setup.py to pyproject.toml. + 5.0 (2025-11-20) ---------------- diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index ce446a6..67fe1fb 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,6 +1,6 @@ # Contributing to zopefoundation projects diff --git a/MANIFEST.in b/MANIFEST.in index e22e408..e04b154 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,5 +1,5 @@ -# Generated from: -# https://github.com/zopefoundation/meta/tree/master/config/zope-product +# Generated with zope.meta (https://zopemeta.readthedocs.io/) from: +# https://github.com/zopefoundation/meta/tree/master/src/zope/meta/zope-product include *.md include *.rst include *.txt diff --git a/pyproject.toml b/pyproject.toml index 8c50e2c..efda977 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,5 @@ -# Generated from: -# https://github.com/zopefoundation/meta/tree/master/config/zope-product - +# Generated with zope.meta (https://zopemeta.readthedocs.io/) from: +# https://github.com/zopefoundation/meta/tree/master/src/zope/meta/zope-product [build-system] requires = [ "setuptools >= 78.1.1,< 81", @@ -8,6 +7,47 @@ requires = [ ] build-backend = "setuptools.build_meta" + +[project] +name = "Products.ZSQLMethods" +version = "5.1.dev0" +description = "SQL method support for Zope." +license = "ZPL-2.1" +classifiers = [ + "Development Status :: 6 - Mature", + "Environment :: Web Environment", + "Framework :: Zope", + "Framework :: Zope :: 5", + "Operating System :: OS Independent", + "Programming Language :: Python :: 3", + "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", + "Programming Language :: Python :: Implementation :: CPython", + "Topic :: Database", + "Topic :: Database :: Front-Ends", +] +dynamic = ["readme"] +requires-python = ">=3.10" +authors = [ + {name = "Zope Foundation and contributors",email = "zope-dev@zope.dev"}, +] +maintainers = [ + {name = "Plone Foundation and contributors",email = "zope-dev@zope.dev"}, +] +dependencies = [ + "Zope >= 4.2.1", + "Missing", + "Record", + "DocumentTemplate >= 3.2.2", +] + +[project.urls] +Source = "https://github.com/zopefoundation/Products.ZSQLMethods" +Issues = "https://github.com/zopefoundation/Products.ZSQLMethods/issues" + [tool.coverage.run] branch = true source = ["src"] @@ -30,3 +70,7 @@ exclude_lines = [ [tool.coverage.html] directory = "parts/htmlcov" + +[tool.setuptools.dynamic] +readme = {file = ["README.rst", "CHANGES.rst"]} + diff --git a/setup.cfg b/setup.cfg index df094fb..c4f5bb6 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ -# Generated from: -# https://github.com/zopefoundation/meta/tree/master/config/zope-product +# Generated with zope.meta (https://zopemeta.readthedocs.io/) from: +# https://github.com/zopefoundation/meta/tree/master/src/zope/meta/zope-product [flake8] doctests = 1 diff --git a/setup.py b/setup.py index cde1fc8..3a960de 100644 --- a/setup.py +++ b/setup.py @@ -15,49 +15,5 @@ from setuptools import setup -with open('README.rst') as f: - README = f.read() - -with open('CHANGES.rst') as f: - CHANGES = f.read() - -setup( - name='Products.ZSQLMethods', - version='5.1.dev0', - url='https://github.com/zopefoundation/Products.ZSQLMethods', - project_urls={ - 'Issue Tracker': ('https://github.com/zopefoundation' - '/Products.ZSQLMethods/issues'), - 'Sources': 'https://github.com/zopefoundation/Products.ZSQLMethods', - }, - license='ZPL-2.1', - description='SQL method support for Zope.', - author='Zope Foundation and Contributors', - author_email='zope-dev@zope.dev', - long_description=(README + '\n' + CHANGES), - classifiers=[ - 'Development Status :: 6 - Mature', - 'Environment :: Web Environment', - 'Framework :: Zope', - 'Framework :: Zope :: 5', - 'License :: OSI Approved :: Zope Public License', - 'Operating System :: OS Independent', - 'Programming Language :: Python :: 3', - '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', - 'Programming Language :: Python :: Implementation :: CPython', - 'Topic :: Database', - 'Topic :: Database :: Front-Ends', - ], - python_requires='>=3.10', - install_requires=[ - 'Zope >= 4.2.1', - 'Missing', - 'Record', - 'DocumentTemplate >= 3.2.2', - ], - include_package_data=True, -) +# See pyproject.toml for package metadata +setup() diff --git a/tox.ini b/tox.ini index a4481a9..0f2cd88 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ -# Generated from: -# https://github.com/zopefoundation/meta/tree/master/config/zope-product +# Generated with zope.meta (https://zopemeta.readthedocs.io/) from: +# https://github.com/zopefoundation/meta/tree/master/src/zope/meta/zope-product [tox] minversion = 3.18 envlist = From dfb05ab9eed9066c018d40b8803cebeb9893deaf Mon Sep 17 00:00:00 2001 From: Jens Vagelpohl Date: Wed, 3 Dec 2025 17:25:59 +0100 Subject: [PATCH 2/2] Update pyproject.toml Co-authored-by: Michael Howitz --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index efda977..187a36d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -38,7 +38,7 @@ maintainers = [ {name = "Plone Foundation and contributors",email = "zope-dev@zope.dev"}, ] dependencies = [ - "Zope >= 4.2.1", + "Zope >= 5", "Missing", "Record", "DocumentTemplate >= 3.2.2",