From fb736094908eeabcdd87425d6cd5e9941ce6ec90 Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Sun, 13 Oct 2024 10:46:26 +0200 Subject: [PATCH] PEP 621: Migrate from setup.cfg to pyproject.toml --- docs/changes/492.misc.rst | 1 + pyproject.toml | 65 ++++++++++++++++++++++- setup.cfg | 55 ------------------- tests/python/pyexample/example/example.py | 2 +- 4 files changed, 66 insertions(+), 57 deletions(-) create mode 100644 docs/changes/492.misc.rst delete mode 100644 setup.cfg diff --git a/docs/changes/492.misc.rst b/docs/changes/492.misc.rst new file mode 100644 index 00000000..fcb58ba5 --- /dev/null +++ b/docs/changes/492.misc.rst @@ -0,0 +1 @@ +PEP 621: Migrate from setup.cfg to pyproject.toml diff --git a/pyproject.toml b/pyproject.toml index 5405db78..0407243d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,70 @@ [build-system] -requires = ["setuptools>=46.4.0"] +requires = ["setuptools>=61.2"] build-backend = "setuptools.build_meta" +[project] +name = "sphinx-autoapi" +authors = [{name = "Eric Holscher", email = "eric@ericholscher.com"}] +maintainers = [{name = "Ashley Whetter", email = "ashley@awhetter.co.uk"}] +description = "Sphinx API documentation generator" +license = {text = "MIT"} +classifiers = [ + "Development Status :: 4 - Beta", + "Environment :: Plugins", + "Framework :: Sphinx :: Extension", + "Intended Audience :: Developers", + "License :: OSI Approved :: MIT License", + "Natural Language :: English", + "Programming Language :: Python", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", +] +requires-python = ">=3.8" +dependencies = [ + 'astroid>=2.7;python_version<"3.12"', + 'astroid>=3.0.0a1;python_version>="3.12"', + "Jinja2", + "PyYAML", + "sphinx>=6.1.0,<8.1.0", + 'stdlib_list;python_version<"3.10"', +] +dynamic = ["version"] + +[project.readme] +file = "README.rst" +content-type = "text/x-rst" + +[project.urls] +Homepage = "http://github.com/readthedocs/sphinx-autoapi" +Documentation = "https://sphinx-autoapi.readthedocs.io/en/latest/" + +[project.optional-dependencies] +docs = [ + "furo", + "sphinx", + "sphinx_design", +] + +[tool.setuptools] +include-package-data = true +license-files = ["LICENSE.rst"] + +[tool.setuptools.packages.find] +include = [ + "autoapi", + "autoapi.*", +] +namespaces = false + +[tool.setuptools.dynamic] +version = {attr = "autoapi.__version__"} + +[tool.distutils.bdist_wheel] +universal = 1 + [tool.mypy] # Start off with these warn_unused_configs = true diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index 9f8cb2d8..00000000 --- a/setup.cfg +++ /dev/null @@ -1,55 +0,0 @@ -[metadata] -name = sphinx-autoapi -version = attr: autoapi.__version__ -author = Eric Holscher -author_email = eric@ericholscher.com -maintainer = Ashley Whetter -maintainer_email = ashley@awhetter.co.uk -description = Sphinx API documentation generator -long_description = file: README.rst -long_description_content_type = text/x-rst -url = http://github.com/readthedocs/sphinx-autoapi -license = MIT -license_files = - LICENSE.rst -classifiers = - Development Status :: 4 - Beta - Environment :: Plugins - Framework :: Sphinx :: Extension - Intended Audience :: Developers - License :: OSI Approved :: MIT License - Natural Language :: English - Programming Language :: Python - Programming Language :: Python :: 3 - Programming Language :: Python :: 3.8 - Programming Language :: Python :: 3.9 - Programming Language :: Python :: 3.10 - Programming Language :: Python :: 3.11 -project_urls = - Documentation = https://sphinx-autoapi.readthedocs.io/en/latest/ - -[options] -packages = find: -include_package_data = True -python_requires = >=3.8 -install_requires = - astroid>=2.7;python_version<"3.12" - astroid>=3.0.0a1;python_version>="3.12" - Jinja2 - PyYAML - sphinx>=6.1.0 - stdlib_list;python_version<"3.10" - -[options.extras_require] -docs = - furo - sphinx - sphinx_design - -[options.packages.find] -include = - autoapi - autoapi.* - -[bdist_wheel] -universal = 1 diff --git a/tests/python/pyexample/example/example.py b/tests/python/pyexample/example/example.py index 4f88de68..3dc7f5e5 100644 --- a/tests/python/pyexample/example/example.py +++ b/tests/python/pyexample/example/example.py @@ -169,7 +169,7 @@ def fn_with_long_sig( signature, many, keyword, - arguments + arguments, ): """A function with a long signature."""