From 6906db61e756901d25b81d276add3b9cad70a5f1 Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Fri, 10 Mar 2023 16:20:22 +0100 Subject: [PATCH 1/2] PEP 621: Migrate settings from setup.cfg into pyproject.toml --- .flake8 | 3 +++ pyproject.toml | 26 ++++++++++++++++++++++++++ setup.cfg | 19 ------------------- 3 files changed, 29 insertions(+), 19 deletions(-) create mode 100644 .flake8 create mode 100644 pyproject.toml delete mode 100644 setup.cfg diff --git a/.flake8 b/.flake8 new file mode 100644 index 00000000..e2eb6301 --- /dev/null +++ b/.flake8 @@ -0,0 +1,3 @@ +[flake8] +max-line-length = 140 +exclude = .tox,.eggs,ci/templates,build,dist diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 00000000..0b6bf33e --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,26 @@ +[build-system] +requires = ["setuptools>=61.2"] +build-backend = "setuptools.build_meta" + +[project] +dynamic = ["version"] +name = "pytest-cov" + +[tool.isort] +force_single_line = "True" +line_length = "120" +known_first_party = "pytest_cov" +default_section = "THIRDPARTY" +forced_separate = "test_pytest_cov" +skip = ".tox,.eggs,ci/templates,build,dist" + +[tool.pytest.ini_options] +testpaths = ["tests"] +python_files = ["test_*.py"] +addopts = """ +-ra +--strict +-p pytester""" + +[tool.setuptools] +include-package-data = false diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index 360a416d..00000000 --- a/setup.cfg +++ /dev/null @@ -1,19 +0,0 @@ -[flake8] -max-line-length = 140 -exclude = .tox,.eggs,ci/templates,build,dist - -[tool:pytest] -testpaths = tests -python_files = test_*.py -addopts = - -ra - --strict - -p pytester - -[tool:isort] -force_single_line = True -line_length = 120 -known_first_party = pytest_cov -default_section = THIRDPARTY -forced_separate = test_pytest_cov -skip = .tox,.eggs,ci/templates,build,dist From f4211e5a110e9e0e37361dedee97af937167867c Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Fri, 10 Mar 2023 16:45:40 +0100 Subject: [PATCH 2/2] PEP 621: Migrate settings from setup.cfg into pyproject.toml --- pyproject.toml | 63 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index 0b6bf33e..152db9d9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -6,6 +6,69 @@ build-backend = "setuptools.build_meta" dynamic = ["version"] name = "pytest-cov" +[metadata] +name = pytest-cov +version = 4.0.0 +author = Marc Schlaich +author_email = marc.schlaich@gmail.com +license = MIT +description = Pytest plugin for measuring coverage. +keywords = + cover + coverage + pytest + py.test + distributed + parallel +url = https://github.com/pytest-dev/pytest-cov +long_description = file: README.rst, CHANGELOG.rst +classifiers = + Development Status :: 5 - Production/Stable + Framework :: Pytest + Intended Audience :: Developers + License :: OSI Approved :: MIT License + Operating System :: Microsoft :: Windows + Operating System :: POSIX + Operating System :: Unix + Programming Language :: Python + Programming Language :: Python :: 3 + Programming Language :: Python :: 3 :: Only + 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 + Programming Language :: Python :: Implementation :: CPython + Programming Language :: Python :: Implementation :: PyPy + Topic :: Software Development :: Testing + Topic :: Utilities +project_urls = + Documentation = https://pytest-cov.readthedocs.io/ + Changelog = https://pytest-cov.readthedocs.io/en/latest/changelog.html + Issue Tracker = https://github.com/pytest-dev/pytest-cov/issues + +[options] +package_dir = + = src +py_modules = +packages = find: +zip_safe = False +install_requires = pytest>=4.6; coverage[toml]>=5.2.1 +include_package_data = True +python_requires = >=3.7 + +[options.entry_points] +pytest11 = pytest_cov = pytest_cov.plugin + +[options.extras_require] +testing = + fields + hunter + process-tests + six + pytest-xdist + virtualenv + [tool.isort] force_single_line = "True" line_length = "120"