diff --git a/CHANGES.rst b/CHANGES.rst index 86d94a8..0b274bc 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -5,7 +5,7 @@ 6.2 (unreleased) ================ -- Nothing changed yet. +- Move all supported package metadata into ``pyproject.toml``. 6.1 (2025-10-29) diff --git a/pyproject.toml b/pyproject.toml index 15302bf..30adcfb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -9,6 +9,46 @@ requires = [ ] build-backend = "setuptools.build_meta" +[project] +name = "ExtensionClass" +version = "6.2.dev0" +description = "Metaclass for subclassable extension types" +readme = "README.rst" +requires-python = ">=3.10" +license = "ZPL-2.1" +authors = [ + { name = "Zope Foundation and contributors", email = "zope-dev@zope.dev" }, +] +maintainers = [ + { name = "Plone Foundation and contributors", email = "zope-dev@zope.dev" }, +] +classifiers = [ + "Development Status :: 6 - Mature", + "Environment :: Web Environment", + "Framework :: Zope", + "Framework :: Zope :: 5", + "Operating System :: OS Independent", + "Programming Language :: Python", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3 :: Only", + "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", + "Programming Language :: Python :: Implementation :: PyPy", +] +dependencies = [] + +[project.optional-dependencies] +test = ["zope.testrunner"] + +[project.urls] +Issues = "https://github.com/zopefoundation/ExtensionClass/issues" +Source = "https://github.com/zopefoundation/ExtensionClass" +Changelog = "https://github.com/zopefoundation/ExtensionClass/blob/master/CHANGES.rst" + [tool.coverage.run] branch = true source = ["ExtensionClass"] diff --git a/setup.py b/setup.py index a17ca91..f2357f8 100644 --- a/setup.py +++ b/setup.py @@ -17,21 +17,11 @@ import platform from setuptools import Extension -from setuptools import find_packages from setuptools import setup -with open('README.rst') as f: - README = f.read() - -with open('CHANGES.rst') as f: - CHANGES = f.read() - # PyPy won't build the extension. -py_impl = platform.python_implementation -is_pypy = py_impl() == 'PyPy' - -if is_pypy: +if platform.python_implementation() == 'PyPy': ext_modules = [] else: ext_modules = [ @@ -49,42 +39,5 @@ include_dirs=['src']), ] -version = '6.2.dev0' - -setup( - name='ExtensionClass', - version=version, - url='https://github.com/zopefoundation/ExtensionClass', - license='ZPL-2.1', - description='Metaclass for subclassable extension types', - author='Zope Foundation and Contributors', - author_email='zope-dev@zope.dev', - long_description='\n\n'.join([README, CHANGES]), - packages=find_packages('src'), - package_dir={'': 'src'}, - classifiers=[ - "Development Status :: 6 - Mature", - "Environment :: Web Environment", - "Framework :: Zope :: 5", - "License :: OSI Approved :: Zope Public License", - "Operating System :: OS Independent", - "Programming Language :: Python", - "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", - "Programming Language :: Python :: Implementation :: PyPy", - ], - ext_modules=ext_modules, - include_package_data=True, - zip_safe=False, - extras_require={ - 'test': [ - 'zope.testrunner', - ], - }, - python_requires='>=3.10', -) +# See pyproject.toml for package metadata +setup(ext_modules=ext_modules)