From 09feabf8cc0c9a5320c6c898d8a5fd74c58a3ee4 Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Sat, 24 Sep 2022 13:31:32 +0200 Subject: [PATCH 1/2] PEP 621: Migrate more config into pyproject.toml --- .flake8 | 8 ++++++ pyproject.toml | 70 +++++++++++++++++++++++++++++++++++++++++++++- setup.cfg | 76 -------------------------------------------------- 3 files changed, 77 insertions(+), 77 deletions(-) create mode 100644 .flake8 delete mode 100644 setup.cfg diff --git a/.flake8 b/.flake8 new file mode 100644 index 0000000..b5fae4e --- /dev/null +++ b/.flake8 @@ -0,0 +1,8 @@ +[flake8] +builtins = _ +show_source = True +exclude=.venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,build +# Minimal config needed to make flake8 compatible with black output: +max_line_length=160 +# See https://github.com/PyCQA/pycodestyle/issues/373 +extend_ignore = E203 diff --git a/pyproject.toml b/pyproject.toml index d5db092..29222f7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [build-system] requires = [ - "setuptools >= 42", + "setuptools>=61.2", "setuptools_scm[toml] >= 3.5.0", "setuptools_scm_git_archive >= 1.1", "wheel >= 0.33.6", @@ -9,3 +9,71 @@ build-backend = "setuptools.build_meta" [tool.setuptools_scm] local_scheme = "no-local-version" + +[project] +name = "doc8" +description = "Style checker for Sphinx (or other) RST documentation" +authors = [{name = "OpenStack", email = "openstack-discuss@lists.openstack.org"}] +maintainers = [{name = "PyCQA", email = "code-quality@python.org"}] +license = {text = "Apache 2.0"} +classifiers = [ + "Development Status :: 5 - Production/Stable", + "Environment :: Console", + "Intended Audience :: Developers", + "Intended Audience :: Information Technology", + "Intended Audience :: System Administrators", + "License :: OSI Approved :: Apache Software License", + "Operating System :: POSIX :: Linux", + "Programming Language :: Python", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Topic :: System :: Systems Administration", + "Topic :: Utilities", +] +keywords = [ + "doc8", + "rst", + "linter", +] +requires-python = ">=3.7" +dependencies = [ + # Ceiled due to DeprecationWarning: The frontend.OptionParser class will be + # replaced by a subclass of argparse.ArgumentParser in Docutils 0.21 or later. + "docutils>=0.19,<0.21", + "restructuredtext-lint>=0.7", + "stevedore", + "tomli; python_version < '3.11'", + "Pygments", +] +dynamic = ["version"] + +[project.urls] +Homepage = "https://github.com/pycqa/doc8" +"Bug Tracker" = "https://github.com/pycqa/doc8/issues" +"Release Management" = "https://github.com/pycqa/doc8/releases" +CI = "https://github.com/pycqa/doc8/actions" +Documentation = "https://doc8.readthedocs.io" +Discussions = "https://github.com/pycqa/doc8/discussions" + +[project.readme] +file = "README.rst" +content-type = "text/x-rst" + +[project.scripts] +doc8 = "doc8.main:main" + +[tool.setuptools] +# use-scm-version = "True" # Does not pass validate-pyproject +package-dir = {"" = "src"} +include-package-data = true +zip-safe = false +# These are required in actual runtime: +license-files = ["LICENSE"] + +[tool.setuptools.packages.find] +where = ["src"] +namespaces = false \ No newline at end of file diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index 6ceeff0..0000000 --- a/setup.cfg +++ /dev/null @@ -1,76 +0,0 @@ -[metadata] -name = doc8 -url = https://github.com/pycqa/doc8 -project_urls = - Bug Tracker = https://github.com/pycqa/doc8/issues - Release Management = https://github.com/pycqa/doc8/releases - CI = https://github.com/pycqa/doc8/actions - Documentation = https://doc8.readthedocs.io - Discussions = https://github.com/pycqa/doc8/discussions - -description = Style checker for Sphinx (or other) RST documentation -long_description = file: README.rst -long_description_content_type = text/x-rst -author = OpenStack -author_email = openstack-discuss@lists.openstack.org -maintainer = PyCQA -maintainer_email = code-quality@python.org -license = Apache 2.0 -license_files = LICENSE -classifiers = - Development Status :: 5 - Production/Stable - - Environment :: Console - - Intended Audience :: Developers - Intended Audience :: Information Technology - Intended Audience :: System Administrators - License :: OSI Approved :: Apache Software License - Operating System :: POSIX :: Linux - Programming Language :: Python - Programming Language :: Python :: 3 - Programming Language :: Python :: 3.7 - Programming Language :: Python :: 3.8 - Programming Language :: Python :: 3.9 - Programming Language :: Python :: 3.10 - Programming Language :: Python :: 3.11 - Topic :: System :: Systems Administration - Topic :: Utilities -keywords = - doc8 - rst - linter - -[flake8] -builtins = _ -show_source = True -exclude=.venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,build -# Minimal config needed to make flake8 compatible with black output: -max_line_length=160 -# See https://github.com/PyCQA/pycodestyle/issues/373 -extend_ignore = E203 - -[options] -use_scm_version = True -python_requires = >=3.7 -package_dir = - = src -packages = find: -include_package_data = True -zip_safe = False -# These are required in actual runtime: -install_requires = - # Ceiled due to DeprecationWarning: The frontend.OptionParser class will be - # replaced by a subclass of argparse.ArgumentParser in Docutils 0.21 or later. - docutils>=0.19,<0.21 - restructuredtext-lint>=0.7 - stevedore - tomli; python_version < '3.11' - Pygments - -[options.entry_points] -console_scripts = - doc8 = doc8.main:main - -[options.packages.find] -where = src From 7831db0dd742397c7e139cc49efcb29cf7acd826 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Sat, 24 Sep 2022 11:41:10 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 29222f7..a4504f3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -76,4 +76,4 @@ license-files = ["LICENSE"] [tool.setuptools.packages.find] where = ["src"] -namespaces = false \ No newline at end of file +namespaces = false